27
Федор Кудинов
Last seen 10 hours ago
Member for 4 years, 10 months, 5 days
Difficulty Normal
I am back,
I got it, you copy link to iterator so zip can call next 2 times for each loop,
Raised score, but still I believe teammates would suffer from such implicit logic, reading your code )
More
Liked this part: st = start_watching if start_watching else els[0]
rather weird logic with lists multiplications. I would suggest to simplify that to add more clarity
I do not get why "for a, b in zip(*[iter(els_)] * 2)" a and b are not equal
More
good idea with str.maketrans('AEIOUY', '000000')
you could remove symbols by re lib:
import re
re.split("\W", text)
More
thought about heap, but ended with bisect search not to mangle signs
I wonder which solution is more effective
More
coords - I would suggest set usage, since position is not necessary, but remove iterates heavily through this object
More
pattern = re.sub('\[\]', '[^.]', pattern)
good catch, in my solution if I find [] I return False at once, and tests still never fail
More
Nice recursive solution, I didn't manage to solve it with recursion
max_total=-1000 you could use float("-inf") instead,
this task can be solved with single loop iteration, as calling recursive function twice in body does not look very effective (I am just jealous :))
More
is there a reason to use reversed(range(1,(len(line)//2)+1)) vs range(1,(len(line)//2)+1, -1)
More
you can replace round(len(line)/2) by math.floor or math.ceil or // based on your algorithm
and if you go from biggest 'i' to least,
you can break function as you get line.count(line[j:j+i]) > 1
More
how do you reset already_computed between calls,
I think it is wrong solution
More