Tip 1 : practice dsa daily
Tip 2 : learn oops
Tip 3 : be confident
Tip 1 : do your best and don’t be afraid
Tip 2 : study regularly and be determined



1) All codes are binary strings.
2) Each code should be able to determine its corresponding character uniquely.
3) The total numbers of bits used to represent the message are minimized.
If there are multiple sets of valid Huffman codes for a message. You can print any of them.
Consider the array ARR = [ 1, 4, 2 ] having 3 elements.
The array containing Huffman Codes for the above array will be [ '10', '0', '11' ]. Other Valid Huffman Codes are [ '01', '1', '00' ], [ '00', '1', '01' ] etc. Codes like [ '1', '0', '01' ], [ '1', '10' , '0' ] are some of the invalid Huffman Codes.


1. The coordinates will be given in non-descending order of X coordinate from start to end of the linked list.
2. All the coordinates will be pairwise distinct i.e there are no two coordinates (X1, Y1) and (X2, Y2) such that X1 = X2 and Y1 = Y2 and there will be an edge between every two consecutive coordinates.
3. The first coordinate and the last coordinate in the input can be assumed as the starting point and the ending point of the curve respectively and there will not be an edge between these two coordinates.
Timing( was it late night)



A subsequence is a sequence that can be derived from another sequence by deleting some or no elements without changing the order of the remaining elements.
You need to print your answer modulo 10^9 + 7.
Let us take A = [1,2,3] and P = 4.
All the subsequences not having product more than ‘4’ are {1}, {2}, {3}, {1,2}, {1,3}. Therefore count is equal to ‘5’.
Step 1 : I first applied bubble sort. It was not good enough.
Step 2 : Interviewer asked me to optimise the solution.
Step 3 : Then i gave solution with merge sort and interviewer was happy.



You can only stack a box on top of another box if the dimensions of the 2-D base of the lower box ( both length and width ) are strictly larger than those of the 2-D base of the higher box.
You can rotate a box so that any side functions as its base. It is also allowed to use multiple instances of the same type of box. This means, a single type of box when rotated, will generate multiple boxes with different dimensions, which may also be included in stack building.

The height, Width, Length of the type of box will interchange after rotation.
No two boxes will have all three dimensions the same.
Don’t print anything, just return the height of the highest possible stack that can be formed.

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