Coderpad_Questions
Coderpad_Questions
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
49
50
Question
Convert this string (aabbb into a2b3) , (aaaa into a4), (a into a1).
Given a string as letters (“ODG”) find the longest cord which matches this cord in a dictionary given (full of s
5
Find the in order traversal method
Submission
3 7
[ 0, 0]
UUU [0, 3]
LLL [-3, 0]
RRR [ 3, 0]
PPP [ 0, -3]
URL 0, 1
1,1
0,1
URLD
Prefix search - ‘Given document, give one prefix -> need to search Document for ‘all occurrences of the prefi
Non repeating character in string (1st Chain).
(1,2,3,4)
(2,2,3,3,4) Input 1 Input 2
3/2 Output
Length of Subarray – 6
A group of students are sitting in a circle. The teacher is electing a new class president. The teacher does th
a song while walking around the circle. After the song is finished the student at which the teacher stopped
from the circle. Starting at the student next to the one that was just removed, the teacher resumes singing a
around the circle. After the teacher is done singing, the next student is removed. The teacher repeats this u
student is left.
A song of length k will result in the teacher walking past k students on each round. The students are number
The teacher starts at student 1.
For example, suppose the song length is two(k=2). And there are four students to start with (1,2,3,4). The fir
to go would be '2', after that '4', and after that '3’. Student '1' would be the next president in this example.
Find and return the maximum average of student's scores from a given input.
- input array can be like String[][] students = new String[][] {{"xyz","20"},{"pqr","30"},{"xyz","51"},{"pqr","3
expected output is 40
- Needed to use Math.floor() function.
- input can have negative values also. String[][] students = new String[][] {{"xyz","-20"},{"pqr","-60"},{"xy
{"mnp","-39"}}; // expected output is -36
Given an array find if its cyclic
Example - startIndex = 0, arr= [1,0] ==> cycle length = 2
Example - startIndex = 0, arr= [2,0,1] ==> cycle length = 3