Tip 1 : Practise 5 problems daily from websites like hackerrank, codechef, codeforces
Tip 2 : Participate in codechef, codeforces contest.
Tip 3 : Attend mock interviews and should have good communication skills.
Tip 1 : Maintain atleast 2 different projects, write powerful summary statement.
Tip 2 : Maintain skills relevant to job description, include relevant experience.
You are given an integer ‘A’. Your task is to find the greatest non-negative integer whose square is less than or equal to ‘A’.
Square of a number is the product of the number with itself. For e.g. square of 3 is 9.
Input Format
The first line of input contains an integer ‘T’ denoting the number of test cases to run. Then the test cases follow.
The first line of each test case c...
The lowest common ancestor (LCA) is a concept in graph theory and computer science.
Let ‘T’ be a rooted tree with ‘N’ nodes. The lowest common ancestor is defined between two nodes, ‘u’ and ‘v’, as the lowest node in ‘T’ that has both ‘u’ and ‘v’ as descendants (where we allow a node to be a descendant of itself). - Wikipedia
For the given tree, The LCA of nodes 5 and 8 will be node 2...
Ninja is a poor but an intelligent boy. He has a rod of length ‘N’ units. He wants to earn maximum money by selling this rod in the market. So he cuts the rod into different sizes and each size has a cost associated with it. Determine the maximum money he can earn by cutting the rod and selling its pieces.
You have been given two arrays/lists 'ARR1' and 'ARR2' of length 'N'. Your task is to pair each element of 'ARR1' to an element of 'ARR2' such that the sum of the absolute difference of all pairs is minimum.
Example:
If 'ARR1' = [0, 2, 1], and 'ARR2' = [8, 10, 4] then the most optimal pairing will be (0, 4) , (1, 8) and (2, 10). The sum of absolute difference will be 4 + 7 + 8 = 19.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is the result of 4 % 2?