Tip 1 - Practice Atleast 250 Questions from coding ninjas
Tip 2 - Ex- Do atleast 2 good projects
Tip 1 : Have some good projects on resume.
Tip 2 : Do not put false things on resume and be confident.
Number of Questions to be solved: 2
Question 1: Easy DP (Related to nth Stair Code, but a bit modification and extension of this question)
Question 2: Find Recurring Sequence in a Fraction



Note: Since the number of ways can be very large, return the answer modulo 1000000007.
N=3

We can climb one step at a time i.e. {(0, 1) ,(1, 2),(2,3)} or we can climb the first two-step and then one step i.e. {(0,2),(1, 3)} or we can climb first one step and then two step i.e. {(0,1), (1,3)}.
The person can reach nth stair from either (n-1)th stair or from (n-2)th stair. Hence, for each stair n, we try to find out the number of ways to reach n-1th stair and n-2th stair and add them to give the answer for the nth stair. Therefore the expression for such an approach comes out to be :
ways(n) = ways(n-1) + ways(n-2)
Number of Questions to be solved: 2
Question 1: Design a class in Java which implements the Deque interface. (i.e. Implement your own Double Ended Queue in Java without using any collections)7 methods to be implemented: addFirst(), addLast(), removeFirst(), removeLast(), peekFirst(), peekLast(), size()
Question 2: In 2D matrix, the gold coin is given in each cell. From the bottom left corner, you have to reach the top right corner by collecting the maximum points.



pushFront(X): Inserts an element X in the front of the deque. Returns true if the element is inserted, otherwise false.
pushRear(X): Inserts an element X in the back of the deque. Returns true if the element is inserted, otherwise false.
popFront(): Pops an element from the front of the deque. Returns -1 if the deque is empty, otherwise returns the popped element.
popRear(): Pops an element from the back of the deque. Returns -1 if the deque is empty, otherwise returns the popped element.
getFront(): Returns the first element of the deque. If the deque is empty, it returns -1.
getRear(): Returns the last element of the deque. If the deque is empty, it returns -1.
isEmpty(): Returns true if the deque is empty, otherwise false.
isFull(): Returns true if the deque is full, otherwise false.
Type 1: for pushFront(X) operation.
Type 2: for pushRear(X) operation.
Type 3: for popFront() operation.
Type 4: for popRear() operation.
Type 5: for getFront() operation.
Type 6: for getRear() operation.
Type 7: for isEmpty() operation.
Type 8: for isFull() operation.
Since Deque is an interface, objects cannot be created of the type deque. We always need a class that extends this list in order to create an object. And also, after the introduction of Generics in Java 1.5, it is possible to restrict the type of object that can be stored in the Deque.



we will travel two paths from (0, 0) to (N-1, M-1) simultaneously, so at each step, we take one step for both paths. So our state will consist of (x1, y1, x2, y2) where (x1, y1) is the position of the first path and (x2, y2) is the position of the second tourist in the grid.
Immutable classes in Java. Started with basic details on how to make any class immutable.
After that they gave some scenarios like the class contains ArrayList, hence when getter for that is called, if we return the ArrayList as is, it will violate the concept of Immutability, as the elements inside the ArrayList can be modified.



Input: Consider the binary tree A as shown in the figure:

Output: [10, 5, 3, 7, 18, 25, 20]
Explanation: As shown in the figure
The nodes on the left boundary are [10, 5, 3]
The nodes on the right boundary are [10, 20, 25]
The leaf nodes are [3, 7, 18, 25].
Please note that nodes 3 and 25 appear in two places but are considered once.
1. Print the left boundary in top-down manner.
2. Print all leaf nodes from left to right
3. Print the right boundary in bottom-up manner.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?