0% found this document useful (0 votes)
51 views

Coding Questions

Ques

Uploaded by

World
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views

Coding Questions

Ques

Uploaded by

World
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Coding Questions

1. https://www.geeksforgeeks.org/counting-sort/
2. https://www.geeksforgeeks.org/program-to-find-number-of-squares-on-a-chessboard/
3. https://leetcode.com/problems/group-anagrams/
4. https://leetcode.com/problems/ugly-number/
5. https://leetcode.com/problems/reverse-words-in-a-string/
6. https://www.geeksforgeeks.org/quick-sort/
7. https://leetcode.com/problems/super-egg-drop/
8. https://www.geeksforgeeks.org/non-repeating-element/
9. https://leetcode.com/problems/online-stock-span/
10. https://leetcode.com/problems/string-compression/
11.
https://github.com/krrysis/Goldman_Sachs/blob/master/10_EvaluateTimeComplexityForFo
rLoop.py
12. https://github.com/krrysis/Goldman_Sachs/blob/master/11_MainFunctionReturn.py
13. https://github.com/krrysis/Goldman_Sachs/blob/master/12_AdjacencyMatrix.py
14. https://github.com/krrysis/Goldman_Sachs/blob/master/13_MinimizeMeetingCost.py
15. https://github.com/krrysis/Goldman_Sachs/blob/master/9_CatsOnCliffs.py
16. https://github.com/krrysis/Goldman_Sachs/blob/master/8_TrianglesInConvexPolygon.py
17. https://github.com/krrysis/Goldman_Sachs/blob/master/7_SequenceInRollingOfDice.py
18. https://github.com/krrysis/Goldman_Sachs/blob/master/6_DaysWithIdenticalWeather.py
19. https://github.com/krrysis/Goldman_Sachs/blob/master/5_RelationalDatabase.py
20. https://github.com/krrysis/Goldman_Sachs/blob/master/4_EvaluateSum.py
21. https://github.com/krrysis/Goldman_Sachs/blob/master/3_TimeSharedOS.py
22. https://github.com/krrysis/Goldman_Sachs/blob/master/2_SubsetsOf0s.py
23. https://github.com/krrysis/Goldman_Sachs/blob/master/1_ArraySpecialProduct.py
24. https://github.com/krrysis/Goldman_Sachs/blob/master/15_Integrity.py
25. https://github.com/krrysis/Goldman_Sachs/blob/master/14_TeamProject.py
26. There are N people some of them are friends. A person having more number
of friends is more popular. In case many people have same number of
friends, the person having more popular friends is most popular among
them.You have to distribute T tickets, to most popular people. Each
person has different ticket requirement. You have to print the list of
people chosen to give the tickets. In case of tie, choose person with
lower index.
Constraints: N <= 500, T <= 500.
27. Given 2N words each of length N. We have to arrange all the words in a matrix of size N * N such that
all the words can be read in the crossword matrix (horizontally/vertically). Also, find the
lexicographically smallest arrangement if many are possible:
Example: Input:
N=3
{abc, bfj, cgk, ade, dfg, ejk}
Output:
abc
dfg
ejk

28. https://leetcode.com/problems/binary-tree-right-side-view/
29. Special Elements
Given a matrix of integers, task is to find out number of special elements. A special element is one
which is either minimum or maximum in a row or in a column. Return -1 if any row or any column has
multiple minimum or maximum elements.
Input : [ [1, 3, 4], [5, 2, 9], [8, 7, 6] ]
Output : 7
30. Coding Wars
There are N coders standing in a line, where i denotes the ith position of a coder with Rating of Ri. All
ratings are distinct. You have to form a team of 3 from amongst them with condition :
"Any three coders with positions (i, j, k) and ratings (Ri, Rj, Rk) can form a team when ( "Ri<Rj<Rk" or
"Ri>Rj>Rk" ) and ( 1 <= i < j < k <= N ) "
You have to find out how many such teams exists ( 1 coder can be part of multiple teams ).
Input :
N=5
Ratings = [ 5, 2, 3, 1, 4 ]
Output :
3
Hint : [ 5, 2, 1 ] [ 5, 3, 1 ] [ 2, 3, 4 ]
31. https://www.csestack.org/coding-challenge-secure-my-conversation-by-encryption-and-decryption/
Asked in Interviews:
● Given an array of integers, modify it so that each element is now the product of all the
other elements of the array (i.e. all the elements excluding itself).

● We are given 9 balls and a balance weighing scale. If we know that 1 ball weighs more than
the other 8 balls(of equal weights), how many minimum comparisons are needed to find
the odd ball.

● Accept a string as input, and create a singly linked list out of it. Then, write a function to
check if this singly linked list is a palindrome.
● https://leetcode.com/explore/interview/card/top-interview-questions-easy/98/design/562/

● Given a number of empty seats in a row, and a number of vaccinated and non-vaccinated
people, return a string showing the seating arrangement with the following constraints :
● There is always an empty seat between two adjacent people.
● No two non-vaccinated people should be seated consecutively.Eg. – if we’re given 10
people with 5 non vaccinated and 4 vaccinated, the output can be
n_v_n_v_n_v_n_v_n.
● Differences between OOPS and Normal programming paradigm.
● What is Polymorphism? Explain with real-life examples.
● What is normalization? What are its advantages?
● What are ACID Properties?
● Questions about my internship.
● What is a process? What is multi-process system?
● What is a thread? What is multi-threaded system?
● What is the difference between multi-process and multi-threaded systems?
● What is a deadlock?
● Can a computer work without an OS?
● Explain Topological Sort

You might also like