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



1. Every train will depart on the same day and the departure time will always be greater than the arrival time. For example, A train with arrival time 2240 and departure time 1930 is not possible.
2. Time will be given in 24H format and colons will be omitted for convenience. For example, 9:05AM will be given as "905", or 9:10PM will be given as "2110".
3. Also, there will be no leading zeroes in the given times. For example, 12:10AM will be given as “10” and not as “0010”.
What are semaphores?
Follow up questions -
What is critical section problem?



You may also choose not to plant that extra tree at all.
Input: 54
Output: 5
The binary representation of 54 is 110110.
After flipping the third bit from the left, we get consecutive 5 bits. i.e. 111110.
"Flip Bit to Win" is a coding problem that involves finding the longest sequence of 1s in a binary number (represented as an integer), with the option to flip at most one 0 bit to 1 in order to maximize the length of the sequence. Here's a high-level algorithm to solve this problem:
Convert the input integer to a binary string representation.
Initialize variables to keep track of the current sequence length, the previous sequence length, and the maximum sequence length.
Loop through each bit in the binary string from left to right:
a. If the current bit is 1, increment the current sequence length by 1.
b. If the current bit is 0, update the maximum sequence length by taking the maximum value among the current sequence length, the previous sequence length plus 1 (indicating that you flip the current 0 bit to 1), and the previous sequence length (indicating that you skip the current 0 bit).
c. Update the previous sequence length with the current sequence length.
Return the maximum sequence length as the result.






As the answer can be large, return your answer modulo 10^9 + 7.
Can you solve this using not more than O(S) extra space?
Tell me about yourself.
Why should I hire you?
What are your strengths and weaknesses?
Why do you want to work at our company?
What are your goals?
What motivates you to do good job?
Give me an example of your creativity.

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?