Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
0 like 0 dislike
554 views
in Online Assessments by Expert (46,090 points) | 554 views

2 Answers

0 like 0 dislike
Best answer

After completing my job hunt phase.. I would like to contribute back.
I have started writing my interview details... Hope it helps.

 

Online Assessment : 90mins, 3 questions

Question 2 : Write a function
class Solution ( public int|] solution(int N); }
that, given an integer N (1 ≤ N ≤ 100), returns an array containing N
unique integers that sum up to 0. The function can return any such array.
For example, given N = 4, the function could return [1, 0, -3, 2] or [-2, 1, -4,
5]. The answer [1, -1, 1, 3] would be incorrect (because value 1 occurs
twice). For N = 3 one of the possible answers is [-1, 0, 1] (but there are
many more correct answers).

by Expert (46,090 points)
0 like 0 dislike
by Expert (46,090 points)