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

2 Answers

0 like 0 dislike
Best answer

4 tasks: 60 minutes.

 

  1. correct one line in the code that would give the correct answers
  2. 10 MCQs
  3. Visible nodes in a binary tree (available on geek for geeks)
  4. given an array like [-2,3,5,-9], return 1,0 or -1 if the product of all elements in the array is positive, 0 or negative respectively.
by Expert (44,360 points)
0 like 0 dislike
Couple of tricky questions in MCQ:

 

how many comparison you have on 5 element array to find minimum value? 4 times

 

Given a list of 1000 elements which of the following numbers is the largest? (all of them)

 

-The time complexity of g(n, x, y) is O(n). What is the time complexity of f(n)? O(nlogN)
def f(n):
if n == 1:
return 1
x = f(n/2)
y = f (n/2)
return g(n,x,y)

 

-which of the following algorithm finds the shortest path in any unweighted graph? BFS
-You are given an array with 10^8 elements and you must compute the sum A[j]+A[k] for every possible pair of elements in the array. How long will this computation take on a single mainstream computer? (milliseconds, seconds, hours, or a few hours) not sure what this answer is
by Expert (44,360 points)