Tip 1 : Graph should be on your tips.
Tip 2 : while explaining the solution to interviewer, dont just hop onto the most optimal solution. Start with the brute force one, give the cons of brute force solution, and then go step by step till you reach the optimal solution.
Tip 3 : Improve on your communication skills as well.
Tip 1 : Mention only what is required for your profile, for e.g. do not stress too much on your co curricular stuff. Rather, try explaining more of your technical stuff that is relevant for your job.
Tip 2 : keep it limited to 1 page. And make sure its a pdf and not an image.
For the given binary tree
The level order traversal will be {1,2,3,4,5,6,7}.
You have been given a Binary Tree of integers. You are supposed to return the level order traversal of the given tree.
Try to solve the problem in 'Single Scan'. ' Single Scan' refers to iterating over the array/list just once or to put it in other words, you will be visiting each element in the array/list just once.
You have been given an integer array/list(ARR) of size 'N'. It only contains 0s, 1s and 2s. Write a solution to sort this array/list.
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)}.
You have been given a number of stairs. Initially, you are at the 0th stair, and you need to reach the Nth stair. Each time you can either climb one step or two steps. You are supposed to return the number of distinct ways in which you can climb from the 0th step to Nth step.
1. The array follows 0-based indexing, so you need to return the 0-based index of the element.
2. Note that the element at the equilibrium index won’t be considered for either left sum or right sum.
3. If there are multiple indices which satisfy the given condition, then return the left-most index i.e if there are indices i,j,k…. which are equilibrium indices, return the minimum among them
4. If no such index is present in the array, return -1.
You are given an array Arr consisting of N integers. You need to find the equilibrium index of the array.
An index is considered as an equilibrium index if the sum of elements of the array to the left of that index is equal to the sum of elements to the right of it.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is the output of print(type("Python"))?