News for hackers. Stuff that matters.
Re:What's Wrong with Tech Hiring by loup-vaillant on Thursday September 16, 2021 @09:25AM (#28551457)
Yes it is, and it wouldn't fail my algorithm:

  a -> not in set -> add a    (a)
  b -> not in set -> add b    (ab)
  c -> not in set -> add c    (abc)
  b -> in set     -> remove b (ac)
  a -> in set     -> remove a (c)
  Set has 1 <= 1 element  ->  return OK
(Of course, "aabcb" would return yes as well, but that's the whole point: we're not asking whether a string is a palindrome, but whether any one of its permutations is.)

There are no comments on this comment yet.