Community

Discussion Board

Anonymous interview experiences, offers and career talk from frontend engineers.

anon_859815

Uber - SWE interview

#uber
04030

Uber · SWE

Rounds

  1. Coding interview

Questions asked

  • For an undirected tree with English letter values: Traverse the graph and find how many distinct palindromes can be formed by rearranging the characters on the path from root to the query node. Return an array with the number of distinct palindromes for each query.

Tips

  • Think about how to efficiently count palindromes using character frequencies. For each path, a palindrome can be formed if at most one character has an odd count.

No replies yet

Markdown supported. 20 more characters needed.