Try to do Data Structures and Algorithm-based questions and first attempt them yourself before going to the solution; also, try to do it as quickly as you can. I also prepared for theory subjects like Operating systems, Database Management Systems, etc, which I prepared through Coding Ninjas subjective notes, and they are very accurate and up-to-mark
Tip 1 : Have some projects on your resume.
Tip 2 : Do not put false things on your resume.



STEP 1: Take num as input.
STEP 2: Initialize a variable temp to 0.
STEP 3: Iterate a “for” loop from 2 to num/2.
STEP 4: If num is divisible by loop iterator, then increment temp.
STEP 5: If the temp is equal to 0,
Return “Num IS PRIME”.
Else,
Return “Num IS NOT PRIME”.



1: 0 <= F[i] <= 2^31 - 1, (that is, each integer fits a 32-bit signed integer type);
2: F.length >= 3;
3: and F[i] + F[i+1] = F[i+2] for all 0 <= i < F.length - 2.
Input: "123456579"
Output: [123, 456, 579]
Explanation:
Since 123 + 456 = 579, therefore the given string can be broken into fibonacci sequence
Start
Declare variables I, a,b, and show
Initialize the variables, a=0, b=1, and show =0
STEP 1: Enter the number of terms of the Fibonacci series to be printed
STEP 2: Print the first two terms of series
STEP 3: Use a loop for the following steps
show=a+b
a=b
b=show
increase the value of I each time by 1
print the value of the show
End



Consider if ‘N’ = 4, the Factorial of 4 will be the product of all numbers from 1 to 4, which is 1 * 2 * 3 * 4 = 24. Hence, the answer is 24.



Input: 'a' = [2, 4, 6] and 'b' = [1, 3, 5]
Output: 3.5
Explanation: The array after merging 'a' and 'b' will be { 1, 2, 3, 4, 5, 6 }. Here two medians are 3 and 4. So the median will be the average of 3 and 4, which is 3.5.
We will do a binary search in one of the arrays which have a minimum size among the two.
Firstly, calculate the median position with (n+1)/2. Point two-pointer, say low and high, equal to 0 and size of the array on which we are applying binary search respectively. Find the partition of the array. Check if the left half has a total number of elements equal to the median position. If not, get the remaining elements from the second array. Now, check if partitioning is valid. This is only when l1<=r2 and l2<=r1. If valid, return max(l1,l2)(when odd number of elements present) else return (max(l1,l2)+min(r1,r2))/2.
If partitioning is not valid, move ranges. When l1>r2, move left and perform the above operations again. When l2>r2, move right and perform the above operations.



1. The input string may contain the same characters, so there will also be the same permutations.
2. The order of permutation does not matter.

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