Live data from Hacker News

Can you solve it? The Greplin programming challenge

challenge.greplin.com

11–20 of 167 posts

Re: Can you solve it? The Greplin programming challenge

#13
post #12

Anybody else browsing by mobile try to do Level 1 by inspection?

After doing the obvious brute force algorithm, the correct answer is not a real word. So you'll have a tough time getting it on your own

Well, I was suggesting looking for symmetrical triads (or repeating characters) and then working outward. I'd say the eye is pretty good at picking out symmetries.

Re: Can you solve it? The Greplin programming challenge

#17
post #12

Earlier quoted context omitted.

After doing the obvious brute force algorithm, the correct answer is not a real word. So you'll have a tough time getting it on your own

Well, I was suggesting looking for symmetrical triads (or repeating characters) and then working outward. I'd say the eye is pretty good at picking out symmetries.

Why aren't you guys just searching for the palindromes?

There's more efficient ways than doing every character, or groups of them... What constitutes a palindrome? What does that mean to simplify what we're doing?

http://www.w3schools.com/jsref/jsref_obj_string.asp

Re: Can you solve it? The Greplin programming challenge

#19

Anybody else browsing by mobile try to do Level 1 by inspection?

Brute works here because of bad test case. Author could have generated a smart test case and then optimal algorithm could be using suffix array which takes O(n), brute would take O(n!). However a bit smart brute gave the answer in approx 3-4 minutes ( computation + coding time). And yes, Python FTW.
Post reply on HN