0% found this document useful (0 votes)
350 views2 pages

Devsinc Questions

Uploaded by

Mubbara Majid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
350 views2 pages

Devsinc Questions

Uploaded by

Mubbara Majid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Questions I was asked in Devsinc for

Associate Software Engineer position

DSA:

1. Suppose there is an array [1,2,3,4,5,6,7]. Find the largest and second largest number in
this array with O(n) complexity.
2. Suppose there is a 2D array that always remain square (meaning rows == columns). Find
the sum of it’s both diagonals.
[[ 1 , 2 , 3 , 4 ],
[ 2 , 3 , 4 , 5 ],
[ 3 , 4 , 5 , 6 ],
[ 4 , 5 , 6 , 7 ]]

Make sure the time complexity is O(n)

3. Write a function that if you pass in number 3 it should return 1 and if you pass in 1 it
should return 3.
4. How to make a stack using linked list.
5. Make a binary tree using a sorted array.
6. What’s the use case of BST.
7. What’s the time complexity of BST searching.
8. What’s the time complexity of finding a value in Hash table.
9. Suppose there is a sorted array [1,2,3,4,5,6] and a number 10. Find two pairs in this array
whose sum is equal to given number. Make sure to find it in O(n) time complexity.
10. How many ways are there to traverse a BST.
11. What is BFS?
12. Write algorithm for BFS.
13. What is heap tree and what is it used for?
14. What is the use case of BST.

OOP:
1. What is composition?
2. Give real world examples of inheritance.
3. What is static binding in Java?
4. If A class inherits B class and B class inherits C class and you instantiate A’s constructor.
Show how the program will be executed.
5. What is a class?
6. What is static and non-static in Java?
DB:

1. Can a candidate key be foreign key?


2. What is the use case of group by in SQL queries.
3. Create a schema for a scenario where there is interviewer and candidates. You need to
schedule interviews for them.
4. How many types of databases are there?

MERN:

React:

1. Differentiate between useCallback and useMemo hook

Node JS:

1. What is Node JS?

Express JS:

1. What is middleware function?

Kuch or bhi thay but can’t remember now

You might also like