MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/3uyl7s/daily_programming_puzzles_at_advent_of_code/cxjpj88/?context=3
r/programming • u/Aneurysm9 • Dec 01 '15
179 comments sorted by
View all comments
Show parent comment
2
That doesn't work for the second part. The second if-statement is incorrect, and will always yield a sum that's equal to the number of brackets.
if pos == -1 { found = true } if !found { ind++ }
View all comments
Show parent comment
2
u/TRT_ Dec 01 '15
That doesn't work for the second part. The second if-statement is incorrect, and will always yield a sum that's equal to the number of brackets.