Tip 1 : Competitive programming plays a major role when you are appearing for coding rounds as a fresher. In the coding rounds, you won't get direct problems copied from Geeksforgeeks or Leetcode. You would be required to use your logical thinking to go ahead in the process. This is where competitive programming helps.
Tip 2 : Coding rounds are all about Coding + Timing. Most people fail to excel due to the pressure of a timer ticking on your head. So, instead of just solving problems, try to participate in timed contests. This will help you be used to the pressure of the timer.
Tip 3 : Many big companies like Microsoft, Amazon, and even Google expect you to be good at standard problems. So, once you are done with coding round by your logical skills and competitive programming, you must be well versed with some standard problems in order to excel.
Tip 4 : Patience is the key to success. The internships and placements are a little luck-based. You may fail despite being an amazing programmer due to the pressure of situations. It's important to give yourself time, stay calm, and learn from your mistakes.
Tip 5 : Do at least 1 good project for internship and 2 good projects for placement interviews.
Tip 6 : Your practice is not defined by the number of problems you solve. It is defined by how you solve the problem. Memorizing 500 problems may not get you a job. But understanding the concept and DSA behind 200 problems may make you excel and help you get a job at Google.
Tip 1 : Make it short, crisp, and simple. It is always good to have a 1 pager resume.
Tip 2 : Resume must comprise of the following: Educational Qualifications, Technical skills, Projects, Work experience (if any), Achievements. Other than this, you may include some extra co-curricular achievements.
Tip 3 : Keep a balance in your resume. A resume having 6-7 projects and no DSA skills are not good. Similarly, a resume full of competitive programming achievements is not good. A resume must have both in a balanced way. 3-4 projects is more than sufficient.
Step 1: Find the LCA of the two given nodes A and B.
Step 2: Find the path from LCA to node A.
Step 3: Find the path from LCA to node B.
Step 4: Use the step 2 and 3 to compute the final answer.
I solved the problem using a recursive approach.
Step 1: Traversed the tree using recursion.
Step 2: If the node is not null, checked whether the node is a leaf node or not.
Step 3: Kept the count of leave nodes.
I solved the problem using a BFS approach to find the shortest path from source to destination, with each node (i, j) having 4 edges at most (i-1, j), (i+1, j), (i, j-1), and (i, j+1).
I used the properties of bitwise and operator to solve the problem in O(1) time complexity.
1. Reverse the entire string.
2. Reverse each and every word from the beginning.