Google | L4 | Bangalore | Phone | August'21
Anonymous User
1533

Given a Binary Tree like structure which repreases a string such that internal nodes only contains the length of string only and actual data is in the leaves.

  1. Return the character given an Index.
  2. Return a substring given an index and length.

Note: This problem statement is coined by me, Interviewer gave it in ambigous manner.

Question is related to Rope/Cord DataStructure (Never heard it before. so, I got confused as hell when he said its Cord DS): https://en.wikipedia.org/wiki/Rope_%28data_structure%29

First, I couldn't understand the problem exactly as he wrote the tree in raw data format and i missed the point the that data is stored in leaves only so, it took me somee time to find a solution eventually i solved and coded the Part-1 but then i had no time left for part-2.

Conclusion: No Hire

Comments (1)