Topic
Topic
Time Complexity 2
• Recursion Program
• Q4: What is the time complexity of the following code?
int fun(int n) {
if(n <= 1) return n;
int x = fun(n - 1);
int y = fun(n - 2);
return x + y;
}
Ans: O(2^n) . Concept: 2^K
#Space Complexity 3
• Searching
• Binary Search
Recurssion*** 4
• Fibonacci
• basic recursive implementation problem
• Q3: Given a recursive function that calculates the sum of the first N consecutive numbers,
provide an appropriate, readable name for the function.
(This checks the ability to provide meaningful names for functions.)
• 3/4 question from recursion
Array 5
• Sort an array that consists with elements of odd numbers.
• Which performs better Linked List or Array?
• Q1: Given an array, what will be the base address if we print the array name only (e.g.,
printf(ara))?
String 6
• caculate the highest length of a palindrome from a given string
• which data structure is good to use to search strings
Pointer 7
• Two Pointers
• Call by value and Call by function
Sorting 8
• Sort an array that consists with elements of odd numbers.
• Explain how insertion sort is works write codes for a given array Details on
• mergesort
• quicksort
• theory about sorting
• What's the difference between selection sort and insertion sort?
Searching 9
• which data structure is good to use to search strings
• Binary Search(***)
Linkedlist 10
• difference between array and linked list
• why can't we use binary search on linked list
• Deletion and insertion of circular linked list Data structures used in DFS and BFS
• Which performs better Linked List or Array?
• how to reverse a linked list?
• What is a Circular linked ist?
Graph 11
• How to describe a graph on code
Stack 12
• one from stack
• Can we make stack with queue? ***
• Describe Stack?
• Q2: Write a code to delete the middle element of a stack without using any additional data
structure while preserving the original order. (only stack will be given, you can use additional
variables but no extra array or something like that) Input: [1, 2, 3, 4, 5]
Output: [1, 2, 4, 5]
• Q12: Can we make stack with queue? ***
#Queue 13
• One priority queue problem from any OJ
• Describe Queue?
DFS 14
• Q13: Given a chessboard, there are some knights placed initially. Asked to discuss the solution
of how can we place some another knights in such a way so that no one attacked each other. *
(Graph - DFS or BFS type solution)
BFS 15
DP (Basic) 16
OOP
• What are the Object-Oriented Principles?
• Describe Encapsulation with examples?
• to write OOP code creating inheritance.
• Abstract class
• polymorphism
• encapsulation
• abstraction
• Runtime Compile Time Polymorphism
• Scope of Private, Protected and public variable
• Write a function to describe polymorphism.
• Q7: Given a Java Code and asked to Identify issues in a code that violated access modifiers.
• Q8: Asked almost all the basic concepts of Object-Oriented Programming (OOP).
DBMS 17
• Normalization
• Explain ER Diagram in Relational Database.
• Q6: Given a table with redundant data in multiple columns, how would you optimize it? (Hint:
Normalization)
• Q9: What is the ACID properties in DBMS?
SQL 18
• SQL query to find second highest salary
• SQL descending order salary
• Find the unqiue column of a database
• Q11: Write a SQL to show all the duplicate rows in a table
• Q5: Explain the order of SQL query execution (e.g., FROM, WHERE, GROUP BY, HAVING,
SELECT).
Design Pattern 19
• Singleton pattern
API 20
• HTTP codes
Networking 21
• Finding network address