Tip 1 : Practice Atleast 250 Questions
Tip 2 : Ex- Do atleast 2 projects
Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.



For ‘N’ = 3,
All possible combinations are:
((()))
(()())
(())()
()(())
()()()



You can’t sell without buying first.
For the given array [ 2, 100, 150, 120],
The maximum profit can be achieved by buying the stock at minute 0 when its price is Rs. 2 and selling it at minute 2 when its price is Rs. 150.
So, the output will be 148.
If we are allowed to buy and sell only once, then we can use the following algorithm. Maximum difference between two elements. Here we are allowed to buy and sell multiple times.
Following is the algorithm for this problem.
Find the local minima and store it as starting index. If not exists, return.
Find the local maxima. And store it as an ending index. If we reach the end, set the end as the ending index.
Update the solution (Increment count of buy-sell pairs)
Repeat the above steps if the end is not reached.



Consider N = 5,
All the binary numbers from 1 to 5 are: 1, 10, 11, 100, 101.
1) Create an empty queue of strings
2) Enqueue the first binary number "1" to queue.
3) Now run a loop for generating and printing n binary numbers.
a) Dequeue and Print the front of queue.
b) Append "0" at the end of front item and enqueue it.
c) Append "1" at the end of front item and enqueue it.



Traverse the tree T in preorder fashion. For every visited node in the traversal, see if the subtree rooted with this node is identical to S.



Let the encoded sequence be 121,
The first way to decode 121 is:
1 = A
2 = B
1 = A
Thus, the decoded string will be ABA.
The second way to decode 121 is:
12 = L
1 = A
Thus, the decoded string will be LA.
The third way to decode 121 is:
1 = A
21 = U
Thus, the decoded string will be AU.
So, there will be 3 ways to decode the sequence 121 i.e. [(ABA), (LA), (AU)].
The input sequence will always have at least 1 possible way to decode.
As the answer can be large, return your answer modulo 10^9 + 7.
Can you solve this using constant extra space?
This problem is recursive and can be broken into sub-problems. We start from the end of the given digit sequence. We initialize the total count of decodings as 0. We recur for two subproblems.
1) If the last digit is non-zero, recur for the remaining (n-1) digits and add the result to the total count.
2) If the last two digits form a valid character (or smaller than 27), recur for remaining (n-2) digits and add the result to the total count.
Project discussion and OS & DBMS concept related questions.
Tell me about your project?
Questions related to the project made .example : Nodejs,HTML,CSS etc.
Management System
Process Vs Threads
ACID properties.
SQL questions on queries.
Introduction
Projects
Where do you see yourself after 5 years .

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