Tip 1 : Mention some good projects on resume
Tip 2 : Be confident
Tip 3 : Good with computer science basics and ds and algo
Tip 1 : Good Projects
Tip 2 : Having some achievements is plus point



Use zero-based indexing for the nodes.
The tree is always rooted at 0.
Simple BFS worked


1. If the list is empty, the function immediately returns None because there is no middle node to find.
2. If the list has only one node, then the only node in the list is trivially the middle node, and the function returns that node.
Given the head node of the singly linked list, return a pointer pointing to the middle of the linked list.



Here, sorted paths mean that the expected output should be in alphabetical order.
Given a square matrix of size 4*4 (i.e. here 'N' = 4):
1 0 0 0
1 1 0 0
1 1 0 0
0 1 1 1
Expected Output:
DDRDRR DRDDRR
i.e. Path-1: DDRDRR and Path-2: DRDDRR
The rat can reach the destination at (3, 3) from (0, 0) by two paths, i.e. DRDDRR and DDRDRR when printed in sorted order, we get DDRDRR DRDDRR.
You are given a starting position for a rat which is stuck in a maze at an initial point (0, 0) (the maze can be thought of as a 2-dimensional plane). The maze would be given in the form of a square matrix of order 'N' * 'N' where the cells with value 0 represent the maze’s blocked locations while value 1 is the open/available path that the rat can take to reach its destination.



Input: ‘n’ = 7
Output: 2
Explanation:
The square root of the number 7 lies between 2 and 3, so the floor value is 2.
So he asked me to explain all approaches from brute force to the optimal solution, which he was expecting me to do in O(logn), and use different methods for each implementations(different methods in same code).



I solved it using backtracking



Input: 'arr' = [1, 2, 7, -4, 3, 2, -10, 9, 1]
Output: 11
Explanation: The subarray yielding the maximum sum is [1, 2, 7, -4, 3, 2].
I used Kadane algorithm here to find subarray with maximum sum. It is a standard question for interview.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?