Re:A Google Interviewing Story
by exit on Friday November 19, 2010 @08:32PM
(#1923532)
sorry, i don't get how characters repeating affects things
[ Parent
| on HN ]
Re:A Google Interviewing Story
by tedunangst on Friday November 19, 2010 @10:23PM
(#1923750)
If there are 3 As in the first string and 4 in the second, it fails. A boolean value can't count to 3.
Re:A Google Interviewing Story
by jamesaguilar on Saturday November 20, 2010 @01:52AM
(#1924031)
Maybe in a different problem it would fail, but this is merely a presence test, so booleans are fine. At any rate, an array of int32s instead of bools would defeat the objection for reasonably long strings.
Re:A Google Interviewing Story
by tedunangst on Saturday November 20, 2010 @12:30PM
(#1924843)
This is that different problem. The author's description is muddy, but you do need the counts.