Position : Senior Android Developer
The competency would be Tech Fit (Problem Solving, Data Structures & Algorithm)
1. Clone a linked list with next and random pointer
2. You have to design a data structure where you have a list. You need to do 3 operations
1. Insert at position.
2. Get Value from an index.
3. Update all index
All in time complexity O(1).
Hint : I have used count for each index and have extra variable to store value if user call Update all index.
With the help of count you can determine if you have to pick value from index or from extra update variable.
On-site round in banglore
1. Question related to project.
2.We have n cards with each card numbered from 1 to n.
All cards are randomly shuffled.
We are allowed only operation MoveCard(n) which moves the card with value n to the top of the pile.
We need to sort the pile of cards with minimum number of MoveCard operations.
The naive approach which i can think of is start with MoveCard(n), MoveCard(n-1), MoveCard(n-2)…. MoveCard(1).
This approach will solve the problem in n MoveCard operations.
1. It was the variation of tree Common Ancestor problem and linked-list Y node problem. I don’t remember exactly
but if you know these two you will be able to answer.
2. Longest Increasing Subsequence
1. 100 people are standing in a circle with gun in their hands. 1 kills 2, 3 kills 4, 5 kills 6 and so on
till we are left with only one person. Who will be the last person alive. Write code to implement this efficiently.
2. java circular dependency questions.
3. Some basic questions
4. Write a program with two threads (A and B), where A prints 1 , B prints 2 and so on until 50 is reached.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above
Related Practice Problems
Feeling lost in the world of random DSA topics, wasting time without progress? It's time for a change! Join our DSA course, where we'll guide you on an exciting journey to master DSA efficiently and on schedule.
Ready to dive in? Explore our Free Demo Content and join our DSA course, trusted by over 100,000 geeks!