Tip 1 : Practice Atleast 250 Questions
Tip 2 : Do at least 2 projects
Tip 1 : Have some projects on your resume.
Tip 2 : Do not put false things on your resume.



Input:
'L' = 15 and 'R' = 19
There is only 1 number between which is good,
16 = 1 + 6 = 7 (which is a prime number).
To optimize the above approach, the idea is based on the following observations:
Odd number – Even Number = Odd Number
Odd number – Odd number = Even number
2 is the only even prime number.
Therefore, the problem reduces to check only for those pairs of prime numbers whose difference between the elements of the pair is equal to 2.
Follow the steps below to solve the problem:
Initialize a variable, say cntPairs to store the count of pairs of prime numbers such that the difference between elements of each pair is also a prime number.
Initialize an array, say sieve[] to check if a number in the range [1, N] is a prime number or not.
Find all the prime numbers in the range [1, N] using Sieve of Eratosthenes.
Iterate over the range [2, N], and for each element in the given range, check if the sieve[i] and sieve[i – 2] are tru



Anagrams are defined as words or names that can be formed by rearranging the letters of another word. Such as "spar" can be formed by rearranging letters of "rasp". Hence, "spar" and "rasp" are anagrams.
'triangle' and 'integral'
'listen' and 'silent'
Since it is a binary problem, there is no partial marking. Marks will only be awarded if you get all the test cases correct.
Basics on java and Data and data structures. Must focus on Binary Trees



The idea to solve this problem is to iterate through all the numbers starting from 2 to sqrt(N) using a for loop and for every number check if it divides N. If we find any number that divides, we return false. If we did not find any number between 2 and sqrt(N) which divides N then it means that N is prime and we will return True.



A subtree of a node X is X, plus every node that is a descendant of X.
Look at the below example to see a Binary Tree pruning.
Input: [1, 1, 1, 0, 1, 0, 1, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]
Output: [1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1]
For example, the input for the tree depicted in the below image would be :

1
2 3
4 -1 5 6
-1 7 -1 -1 -1 -1
-1 -1
Level 1 :
The root node of the tree is 1
Level 2 :
Left child of 1 = 2
Right child of 1 = 3
Level 3 :
Left child of 2 = 4
Right child of 2 = null (-1)
Left child of 3 = 5
Right child of 3 = 6
Level 4 :
Left child of 4 = null (-1)
Right child of 4 = 7
Left child of 5 = null (-1)
Right child of 5 = null (-1)
Left child of 6 = null (-1)
Right child of 6 = null (-1)
Level 5 :
Left child of 7 = null (-1)
Right child of 7 = null (-1)
The first not-null node (of the previous level) is treated as the parent of the first two nodes of the current level. The second not-null node (of the previous level) is treated as the parent node for the next two nodes of the current level and so on.
The input ends when all nodes at the last level are null (-1).
The above format was just to provide clarity on how the input is formed for a given tree.
The sequence will be put together in a single line separated by a single space. Hence, for the above-depicted tree, the input will be given as:
1 2 3 4 -1 5 6 -1 7 -1 -1 -1 -1 -1 -1
Basics HR Questions like behavioral questions and locations wise question.
Introduce yourself
What is the biggest challenge you faced in the journey till now?
What would you do to create harmony among your team?

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?