Tip 1 : Practice DSA questions for all topics - LinkedList, stacks, queues etc
Tip 2 : Have a proper analysis of the DSA question before attempting it.
Tip 3 : Learn System Design
Tip 1 : Resume should be 1 page
Tip 2 : All the achievements and important things should be highlighted.
We were given 2 days of window to complete a test of 2 hour.
- An encoded string will be of the form <count>[encoded_string], where the 'encoded_string' inside the square brackets is being repeated exactly 'count' times. Note that 'count' is guaranteed to be a positive integer and can be greater than 9.
- There are no extra white spaces and square brackets are well-formed.
Input: 2[a]
“a” is encoded 2 times, hence the decoded string will be "aa".
Input: 3[a2[b]]
“b” is encoded 2 times, which decodes as 3[abb]. Now, "abb" is encoded 3 times, hence decoded string will be "abbabbabb".
2 coding questions were asked
The width of each bar is the same and is equal to 1.
Input: ‘n’ = 6, ‘arr’ = [3, 0, 0, 2, 0, 4].
Output: 10
Explanation: Refer to the image for better comprehension:
You don't need to print anything. It has already been taken care of. Just implement the given function.
Starting with O(n square) approach then optimised to O(n)
If A = [3, 2, 3], and K = 2.
Then max of [3, 2] = 3 and max of [2, 3] = 3
So, the answer will be [3, 3]
If A = [3, 2, 3, 5, 1, 7] and K = 3.
Then max of [3, 2, 3] = 3
Then max of [2, 3, 5] = 5
Then max of [3, 5, 1] = 5
Then max of [5, 1, 7] = 7
So the answer will be [3, 5, 5, 7]
Can you solve the problem in O(N) time complexity and O(K) space complexity?
Solved using heap
Basic java design patterns and multithreading questions
Singleton pattern - build a class that returns DB connection
Tip 1 : Used a singleton pattern
Tip 2 : Make it thread-safe.
Tip 3 : Write code in java
What is multi threading?
What do you mean by exception handling?
Tip 1 : Prepare basics of multi-threading
Tip 2 : Basics of Exception handling is a must
Tip 3 : In-depth knowledge of java keywords
It was a mix of all things. Coding question, Basics of AWS, java related questions, all things were asked
The Linked Lists, where a1, a2, c1, c2, c3 is the first linked list and b1, b2, b3, c1, c2, c3 is the second linked list, merging at node c1.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Which traversal uses a queue as its primary data structure?