Tip 1 : practice at least 500 different type of questions
Tip 2 : You have to do projects in your interesting domain
Tip 3 : Be confident while doing questions. Always try not to see topics again and again
Tip 1 : Put some of your internships
Tip 2 : Put those projects that involves coding



1. The length of each array is greater than zero.
2. The first index of each array is the most significant digit of the number. For example, if the array A[] = {4, 5, 1}, then the integer represented by this array is 451 and array B[] = {3, 4, 5} so the sum will be 451 + 345 = 796. So you need to return {7, 9, 6}.
3. Both numbers do not have any leading zeros in them. And subsequently, the sum should not contain any leading zeros.



For the given ‘EDGES’ = [ [0,1],[1,2],[1,3],[1,4] ] and ‘N’ = 5.The number of nodes satisfying the condition is 1. Only Node 1 satisfies the given condition.




Consider the two strings 'P' = "abfyg" and 'Q' = "gabfy"
If we cyclically rotate String 'P' to the right once. The resulting string P becomes "gabfy" which is equal to String 'Q'.
Therefore it is possible to convert String 'P' to String 'Q'.
class Solution
{
//Function to check if a string can be obtained by rotating
//another string by exactly 2 places.
public static boolean isRotated(String str1, String str2)
{
if(str1.length() != str2.length()){
return false;
}
if(str1.length() == 1){
return str1.equals(str2);
}
// char[] c1 = new char[str1.length()];
// char[] c2 = new char[str2.length()];
// for(int i = 0; i < c1.length; i++){
// c1[i] = str1.charAt[i]
// }
// for(int i = 0; i < c2.length; i++){
// c2[i] = str2.charAt[i]
// }
String clock = "";
String anti = "";
int len = str1.length();
clock = str1.substring(len - 2, len) + str1.substring(0, len - 2);
anti = str1.substring(2, len) + str1.substring(0, 2);
if(str2.equals(clock) || str2.equals(anti)){
return true;
}
return false;
}
}
What is an efficient way to implement a singleton pattern in Java? Give me an code example
There are some questions based on Linked list, tree, stack, array, heap sort definition and structures. Also I have to define them in my own way.

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?