Tip 1 : Prepare from interview bit
Tip 2 : Practice as much as you can specially topics likes arrays and strings
Tip 3 : Learn theory of OOPS, DBMS and do atleast 2 projects
Tip 1 : Have some projects on your resume
Tip 2 : Have some certifications and be true to your resume
It was in the morning from 9 to 12
It was conducted in an online mode



'arr '= [1,2,3,4,5]
'k' = 1 rotated array = [2,3,4,5,1]
'k' = 2 rotated array = [3,4,5,1,2]
'k' = 3 rotated array = [4,5,1,2,3] and so on.
import java.util.*;
public class Main
{
static int[] rotate(int nums[], int n, int k) {
if (k > n)
k = k % n;
int[] ans = new int[n];
for (int i = 0; i < k; i++) {
ans[i] = nums[n - k + i];
}
int index = 0;
for (int i = k; i < n; i++) {
ans[i] = nums[index++];
}
return ans;
}
public static void main(String[] args) {
int Array[] = { 1, 2, 3, 4, 5 };
int N = 5;
int K = 2;
int[] ans = rotate(Array, N, K);
for (int i = 0; i < N; ++i) {
System.out.println(ans[i]);
}
}
}


Input: ‘N’ = 1, ‘TASKS = [ [1, 20] ]
Output: 19
For the first task, the given range consists of 20 numbers present out of which ‘11’ is the only number that has repeated occurrences of ‘1’ in its decimal representation.
import java.util.*;
public class Main
{
static int find(int n1, int n2) {
int count = 0;
for (int i = n1 ; i <= n2 ; i++) {
int num = i;
boolean[] visited = new boolean[10];
while (num > 0) {
if (visited[num % 10] == true)
break;
visited[num % 10] = true;
num /= 10;
}
if (num == 0)
count++;
}
return count;
}
public static void main(String[] args) {
int n1 = 101, n2 = 200;
System.out.println(find(n1, n2));
}
}

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?