Join Regular Classroom : Visit ClassroomTech

Previous Year Coding Questions Suggestion Paper – codewindow.in

Hot Topics

Company Based – Codewindow

Interview Questions
1. TCS Technical Questions
2. CTS Technical Questions
3. Infosys Technical Questions
4. Capgemini Technical Questions
5. IBM Technical Questions
6. Wipro Technical Questions
7. Accenture Technical Questions
8. Deloitte Technical Questions
9. MindTree Technical Questions
10. NTT Data Technical Questions
11. Persistent Technical Questions
12. Hexaware Technical Questions
13. ZOHO Technical Questions
14. HCL Technical Questions
15. Genpact Technical Questions
16. udostres Technical Questions
17. samsung research Technical Questions
18. Media.net Technical Questions
19. Tejas Network Technical Questions
20. Kantar Technical Questions
21. Itron Technical Questions
22. Fractal Analyst Technical Questions
23. Lexmark International Technical Questions
24. Infeneon Technologies Technical Questions
25. Razorpay Technical Questions
26. payu Technical Questions
27. Navi Technical Questions
28. Tata Cliq Technical Questions
29. Grab Technical Questions
30. Schlumberger Technical Questions
31. Latenview Analytics Technical Questions
32. GreayB Technical Questions
33. Tally solution Technical Questions
34. Amagi Technical Questions
35. HFCL Technical Questions
36. Slice Technical Questions
37. Larsen & Turbo Technical Questions
38. Zenser Technical Questions
39. Siemens Technical Questions
40. Exon Movie Technical Questions
41. Gupshup Technical Questions
42. Smart cube Technical Questions
43. Celebal Tech Technical Questions
44. Teg Analytics Technical Questions
45. Commvault Systems Technical Questions
46. Incuture Technical Questions
47. Tiger Technical Questions
48. Bridgei2i Technical Questions
49. code nation Technical Questions
50. DE Show Technical Questions
51. Amazon Technical Questions
52. Flipkart Technical Questions
53. Morgan Stanly Technical Questions
54. duutsche bank Technical Questions
55. textas Technical Questions
56. pwc Technical Questions
57. salesforce Technical Questions
58. optum Technical Questions
59. Nvidia Technical Questions
60. Itc Infotech Technical Questions
61. linkedin Technical Questions
62. Adobe Technical Questions

Previous Year Coding Questions

Input The four numbers n, m, a, b (1 n, m, a, b 1000) on a single line represent the number of rides. Ann has scheduled , the number of rides covered by the m ride ticket,the cost of a one ride ticket, and the cost of a m ride ticket.
Output Should be Print a single line integer – the minimum sum in rubles that Ann will need to spend.

Sample Input: 

6 2 1 2

Sample Output:

6

Write a function  solve() which function takes the following 3 parameters and returns the solution :
 N : Represents the number of servers.
 M : Represents the number of requests.
 Requests : Represents the load of each request.
Input format for custom testing :
Note : Use this input format if you are testing against custom input or writing code in
a language where we don’t provide boilerplate code.
 The first line contains N denoting the number of servers.
 The second line contains M denoting the number of requests.
 The third line contains an array requests denoting the load of each request.
Output Format :
Print an array, denoting the server that serves each request.
Constraints :
1 <= N <= 10^5
1 <= M <= 10^5
1 <= request[i] <= 10^9

Sample Input: 

2
1

Sample Output: 

1 2

Given an array A of N integers and an array B of Q queries and updates. There are
three types of queries which are as follows –
 1 lrv : Initialize every element with v in the range [l,r].
 2 lrv : Change every element x in the range [l,r] to x OR v.
 3 lr0 : Find the sum of bitwise AND of all the subarrays [l1,r1] such that l1>=l
and r1<=r
You have to return the answer for each query of type 3 in the order in which they are asked.


Problem Constraints :
1 <= N <= 10^5
0 <= A[i] <= 31
1 <= Q <= 10^5
1 <= B[i][0] <= 3
1 <= B[i][1] <= B[i][2] <= N
0 <= B[i][3] <= 31

A greedy man enters a store to buy some exorbitant chocolates. As he enters, he finds
‘N’ number of boxes consisting of chocolates. Each box consists of a certain number
of chocolates a[i]. The task here is to find the maximum (max) number of chocolates
he can buy from ‘N’ boxes in the following way :
He can pick chocolates from any box.
Once he picks chocolates from a box, he can exchange those with chocolates from
another box.
He can pick or exchange chocolates only moving ahead and cannot come back to pick
or exchange.
If the number of chocolates in the boxes is in decreasing order, return value 0.

Sample Input: 

9 = Value of N
{10, 25, 30, 35, 6, 59, 75, 32, 105} = a[]. 
Elements a[0] to a[N-1]
where input each element is separated by new line

Sample Output: 

167 = Maximum no of chocolates the man can get.

Special Factors ; Ram was given an assignment by his teacher to find the special factors of a positive number N.
A factor is a number which exactly divides the given number (including the number) .
A factor is special if it is a prime number.

Help Ram by identifying all the special features of the number N.
Write a program that reads the number N and prints the special factors of the number
N.
Input will be The input will be a single line containing an integer representing a positive
number N.
Output will be The output should be a single line containing the space-separated special
factors of the number N in ascending order.

Explanation :
Test Case : If N = 20,
The factors of 20 are 1,2,4,5,10,20, whereas the special factors are 2,5.

Sample Input: 

20

Sample Output: 

2 5

Maximum good length;
You are given a matrix A of size N*M. Any length ‘L’ can be called good length, if
there is at least one square matrix of size L*L in A such that all elements in that
square matrix are greater than or equal to L. You need to output the maximum good
length for given matrix.

Sample Input: 

N = 5, M = 4
A = [[4 4 6 3],
[ 4 4 4 6],
[3 5 5 5],
[1 2 6 4],
[4 3 2 1]]

Sample Output: 

3

Explanation :
There are two 3*3 matrices in which all the elements are greater than or equal to 3.

Nagarro Solved

Automata Fixing

      

Popular Category

Hot Topics

Company Based – Codewindow

Interview Questions
1. TCS Technical Questions
2. CTS Technical Questions
3. Infosys Technical Questions
4. Capgemini Technical Questions
5. IBM Technical Questions
6. Wipro Technical Questions
7. Accenture Technical Questions
8. Deloitte Technical Questions
9. MindTree Technical Questions
10. NTT Data Technical Questions
11. Persistent Technical Questions
12. Hexaware Technical Questions
13. ZOHO Technical Questions
14. HCL Technical Questions
15. Genpact Technical Questions
16. udostres Technical Questions
17. samsung research Technical Questions
18. Media.net Technical Questions
19. Tejas Network Technical Questions
20. Kantar Technical Questions
21. Itron Technical Questions
22. Fractal Analyst Technical Questions
23. Lexmark International Technical Questions
24. Infeneon Technologies Technical Questions
25. Razorpay Technical Questions
26. payu Technical Questions
27. Navi Technical Questions
28. Tata Cliq Technical Questions
29. Grab Technical Questions
30. Schlumberger Technical Questions
31. Latenview Analytics Technical Questions
32. GreayB Technical Questions
33. Tally solution Technical Questions
34. Amagi Technical Questions
35. HFCL Technical Questions
36. Slice Technical Questions
37. Larsen & Turbo Technical Questions
38. Zenser Technical Questions
39. Siemens Technical Questions
40. Exon Movie Technical Questions
41. Gupshup Technical Questions
42. Smart cube Technical Questions
43. Celebal Tech Technical Questions
44. Teg Analytics Technical Questions
45. Commvault Systems Technical Questions
46. Incuture Technical Questions
47. Tiger Technical Questions
48. Bridgei2i Technical Questions
49. code nation Technical Questions
50. DE Show Technical Questions
51. Amazon Technical Questions
52. Flipkart Technical Questions
53. Morgan Stanly Technical Questions
54. duutsche bank Technical Questions
55. textas Technical Questions
56. pwc Technical Questions
57. salesforce Technical Questions
58. optum Technical Questions
59. Nvidia Technical Questions
60. Itc Infotech Technical Questions
61. linkedin Technical Questions
62. Adobe Technical Questions

We Love to Support you

Go through our study material. Your Job is awaiting.

Recent Posts
Categories