0% found this document useful (0 votes)
30 views213 pages

Interview Preparation Material

Uploaded by

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

Interview Preparation Material

Uploaded by

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

Got details.

*Pros*
• Very well known company in terms of skilled people, since they have really good training system. When someone leaves Aba
• Extreme level of hard work is needed and becomes tough at times (but that's what's great). Because they really push the pers
• Good increments.
• Spend 1 or 2 years atleast and don't miss the opportunity, since "Abacus" developers are well known in market.

*Cons*
• Growth is comparatively slow in terms of position (not in terms of salary though).
When someone leaves Abacus and applies somewhere else, they often are not interviewed much since they trust that someone experience
se they really push the person to the best to train him. If you feel like giving up, don't! There will always be a team to support you, and the t

wn in market.
ust that someone experiences from Abacus will surely be of great skillset.
am to support you, and the tough environment will be worth it.
2023 CODING TEST
Question Set_Recruitment Test

OOP
Inheritances ki types
Multilevel or multiple inheritance
List or tuple ma difference bss ye sb poocha

File handling,
Arrays benefitsappend and write mode. Difference, How to use them in java?
and drawbacks?
Divide and conquer
Constructor vs estructor
(Real World
Scope (local examples)
vs global)
Difference between var and let in context of scoping
Arbisoft online technical interview (30+ mints)

1. Introduction and fyp idea and motivation


& Restful services are being used in your fyp?
3. Why Copy constructor used

4. Deep copy vs Shallow copy


5. Polymorphism
Shape* s=new circle();
Which class area fun will be called and why
6. Linkedlist vs array
7. Why can't access linkedlist 5th index while can do it in array
8. Is size of 'char pointer' and 'int pointer' same?
9. Recursion vs Loop
10. Space complexity of the factorial function
11. Where is stack located? Program k sath? Ya system k sath? Ya OS k sath?
12. Race condition, Semaphore, mutex, deadlock
13. Fibbonacci
14. Time complexity and space complexity of code
15. Indexing in db
16. Normalization. When denormalization is required? When normalization is enough?
17. How to check number is even/odd without using mod or & operator?(agenda is to see what you do when your implied soluti
What do you want to ask?
Link
Link

Solution Interviewer DB Solution Interviewer

tion is enough?
?(agenda is to see what you do when your implied solution fails and you have to find a solution out of box)
OOAD/SE/
DSA Solution Interviewer SRE Solution Interviewer OTHERS
OOD ka sawal jo attempt kia tha test ma Introduce yourself
FYP
API walay ki approach
Coding
Solution Interviewer Questions Solution Interviewer
oduce yourself

walay ki approach
Solution Interviewer DB

Homogeneous and
Encapsulation heterogenous databases

Abstraction Transactions in databases


Abstract classes and
interfaces Normalisation
Polymorphism Fyp Erd
Inheritance 2nd max
Inheritance vs
polymorphism Databse definition
Association Normalization and types
Aggregation
types of inheritance

Arrivy level 2 interview


Favorite subject kn sa
Polymorphism
Function overloading
Array vs linklist
Types of linklist
Trees
Traversal
Types of traversal

dfs working
Bfs implementation detail theoretically
Then sudo code
2d array or matrix of character type
Make possible words from that matrix

*Arrivy interview*

What are the minimum requirements for a class to be abstract


Inorder, preorder ,postorder
Difference between virtual and pure virtual functions
Why linkedlist when we have array
Difference between stack and queue in terms of memory allocation
Difference between tree and graph
Difference between indirect and direct recursion
Difference between stack and heap in terms of memory allocation
Solution Interviewer DSA Solution Interviewer OOAD/SE/SRE

deep copy
shallow copy Design patterns

Hashing Facade

Array vs linkedlist
Level order traversal with new line at each level
Zig zag traversal

Level by traversal
Binary search implementation
Array vs linked list
Hash function

what is hashmap/ hash func/ hashing. why hashing?


Solution Interviewer OTHERS Solution Interviewer

Fyp detail discussion


Questions about each and
everything mention in ur
resume (including projects u
mention)

intro
fyp
FYP and Semester projects in detail

React component life cycle

Black box testing SQA Interview


White box testing SQA Interview
Smoke SQA Interview
Sanity SQA Interview
Regression and retesting SQA Interview
Validation and. Verification SQA Interview
Test case SQA Interview
Test scenarios SQA Interview
Scrum SQA Interview
Traceability matrix SQA Interview
Unit testing SQA Interview
Integration testing SQA Interview
Alpha beta testing SQA Interview
Sdlc and stlc SQA Interview
Test cases for login and
whatsapp recording button SQA Interview

SQA Interview
Basic concept of automation SQA Interview
Load and stress testing SQA Interview
Semester projects SQA Interview
Fyp SQA Interview
Why sqa SQA Interview
Limitations of automation SQA Interview
Coding Questions Solution Interviewer
Find the count of substrings in a string
that's palindrome

DFS PSUEDOCODE and Complexity


ASHLAR INTERNSHIP PROGRAM

Intro

Basic oop (what and why) and real life examples

Discussion about all projects mentioned in your Resume

Discussion about FYP

A bit of DSA

Sorting algos time complexities and stuff


Real life examples from within the room
What is time complexity and how does it affect the execution
Diagrammatic flow of sorting algos
Coding illustration of basic oop concepts
PS: the interviewer was quite friendly in my case
And use simple words rather than too technical terms, like you're explaining to a layman
Analytical Questions
Math ratio, probability related some English questions opposite/synonyms/paragraph
intro
fyp
in singly linked LinkedList swap adjacent nodes like 1->2->3->4->5 to 2->1->4->3->5
why main function is static in java
queue implementation using stack
outter joins
jagged array
LRU page replacement algo
paranthesis mismatch check without using stack. I used LinkedList.
interface, static, abstract classes can not instantiate an object.
it's a basic interview with manager
some aptitude questions
FYP questions
3-4 skills that you consider your strength(non-tech)
goals in life
Pre Interview Tests with solutions Link

OOP Solution Interviewer

Pillars of oop

Funtion overloading/overriding

Dynamic Binding

What is diamong problem? How to solve it

Virtual Functions

Dangling Pointer
Which class constructor will be called in inheritance
abstraction vs encapsulation
Polymorphism Real world expample
static keyword
can we private constructor in class and benfit of it.
what cohesion does?
Inheritance types? Multi level vs multiple?
if third is inheriting from two classes and parent
classes have same name function
how to tackle that?

interviewer:
brainX 1st technical interview Zubair

problems:
1. find two most frequently occuring elements in non
unique sorted array
2. find difference of sum of left and right diagonal of
3x3 matrix in O(n)
3. fibonoci series using recursion
4. reverse linked list
5. 3 and 5 litre jug problem (measure 4 litre water)
6. delete node with two children in BST
PF:
pointer vs reference, memory leakage, dangling
pointer, access modifiers, static vs dynamic meory
allocation
-> how to avoid memory leakage

OOP:
inheritance, inheritance types, diamond problem,
abstract functions, abstract class, interface, friend
function, friend class, polymorphism, overriding,
overloading, constructor vs destructor, copy
constructor, shallow and deep copy
-> if child class provide definition to abstract function it
would be overriding or overloding?

DB:
normalization, nosql, transactions, roll back, stored
procedures, left join, self join, non-equi join, left outer
join
-> find all employees having same manager_id

DSA:
double linked list, BST, pre vs post order traversal
-> BFS and DFS on trees and graphs

AOA:
sorting alogrithms, name of any 4 algorithms, working
of selection sort
DB Solution Interviewer DSA Solution

Find Second largest


element in an array
How to shift array towards
SQL/NoSql difference right
Write four types of keys and Find if sum of array is 10 in
explain them o(n)

crud queries Anagram

normalization Sorting algo complexity

Find DFS AND BFS of


Er Diagram Database Binary search tree
Infix and postfix conversion
OOAD/SE/
Interviewer SRE Solution Interviewer OTHERS Solution
8 balls and one ball wight is
more. Find high weight ball in
less terms?
Find Duplicate Number
problem.

Palindrom Problem
Find Power of Number using
recursion
15 Manufacture produce 27
balls in 1 hour, if there is 45
manufactures how many
ball they will make in 40
minutes.
There is array and sum value
you have to return index of
values which have equal to
sum. And How will you
reduce to O(n)?
Coding
Interviewer Questions Solution Interviewer
Diamond Problem
OOP
(What is it, How to
Solution Interviewer DB Solution
solve) NoSql

Polymorphism Sql Injection

Inheritance and its Types


multi-level and multiple Joins
Indexing and its types

SQL vs NoSQL
Interviewe Interviewe
r DSA Solution r OOAD/SE/SRE
string palindrome

[1,2,3,[5,6,7],7,8] make this 2D


array in 1D using recursion

Linklist vs Array
Queue and Stack

reversal of linked list


Delete middle node from Linked List
Create queue using stacks
reverse an array without using any extra memory
find middle of linklist using 1 loop
which one is better approach using array or linklist ?
Interviewe Interviewe Coding
Solution r OTHERS Solution r Questions
Analytical(Alot)
two ropes, one rope takes 1 hour
to burn completlely, you have to
measure exactlt 45minutes
3 containers with wrong tags, you
can check only one, make the tags
correct
3L 5L jug problem
short the length of rope without
cutting it
9 balls weight problem
FYP stack related questions
FYP ERD
Interviewe
Solution r
QUESTIONS

Q1) array A consisting of N integers is given. A slice of that array is a pair of integers (P, Q) such that 0 ≤ P ≤ Q < N. A slice (P,
called non-negative if all the elements A[P], A[P+1], ..., A[Q−1], A[Q] are non-negative. The sum of a slice (P, Q) of array A is th
+ ... + A[Q−1] + A[Q]. For example, the following array A: A[0] = 1 A[1] = 2 A[2] = -3 A[3] = 4 A[4] = 5 A[5] = -6 has non-negative
1), (3, 3), (4, 4) and (3, 4). The sum of slice (0, 1) is A[0] + A[1] = 1 + 2 = 3. The sum of slice (3, 4) is A[3] + A[4] = 4 + 5 = 9. Th
A[4] = 5.

You are given an implementation of a function: def solution(A) that, given an array A consisting of N integers, returns the maxi
negative slice in this array. The function returns −1 if there are no non-negative slices in the array. For example, given the follow
A[1] = 2 A[2] = -3 A[3] = 4 A[4] = 5 A[5] = -6 the function should return 9, as explained above.

The attached code is still incorrect for some inputs. Despite the error(s), the code may produce a correct answer for the ex
goal of the exercise is to find and fix the bug(s) in the implementation. You can modify at most three lines. Assume that: N is an
range [0..1,000]; each element of array A is an integer within the range [−1,000..1,000]. In your solution, focus on correctness.

def solution(S):
max_sum = 0
current_sum = 0
positive = False
n = len(S)
for i in range(n):
item = S[i]
if item < 0:
if max_sum < current_sum:
max_sum = current_sum
current_sum = 0
else:
positive = True
current_sum += item
if (current_sum > max_sum):
max_sum = current_sum
if (positive):
return max_sum
return -1

Q2)

We will call a sequence of integers a spike if they first increase (strictly) and then decrease (also strictly, including the last elem
part). For example (4, 5, 7, 6, 3, 2) is a spike, but (1, 1, 5, 4, 3) and (1, 4, 3, 5) are not. Note that the increasing and decreasing
e.g.: for spike (3, 5, 2) sequence (3, 5) is an increasing part and sequence (5, 2) is a decreasing part, and for spike (2) sequenc
increasing and a decreasing part. Your are given an array A of N integers.

Your task is to calculate the length of the longest possible spike, which can be created from numbers from array A. Note that yo
to find the longest spike as a sub-sequence of A, but rather choose some numbers from A and reorder them to create the longe
function: def solution(A) which, given an array A of integers of length N, returns the length of the longest spike which can be cre
from A. Examples: 1. Given A = [1, 2], your function should return 2, because (1, 2) is already a spike. 2. Given A = [2, 5, 3, 2,
should return 6, because we can create the following spike of length 6: (2, 4, 5, 3, 2, 1). 3. Given A = [2, 3, 3, 2, 2, 2, 1], your fu
because we can create the following spike of length 4: (2, 3, 2, 1) and we cannot create any longer spike. Note that increasing
should be strictly increasing/decreasing and they always intersect. Write an efficient algorithm for the following assumptions: N
range [1..100,000]; each element of array A is an integer within the range [1..1,000,000].
SOLUTION

And this is the solution of the q2 which I created in the test:

def Solution(A):
size = len(A)

max_element = -1

if size < 3:
return 2;

for i in range(size):
if A[i] > max_element:
max_element = A[i]

frequency = {}
else:
frequency[A[i]] = 1
return max_size
OOP Solution Interviewer DB Solution
Draw schema of a
subsystem of FYP
(scenario given) All Types of Joins
Types of relationships in Basic Select / Where
DB Query
Given a scenario, explain
what relationship holds
there (1-many etc)
What is normalization?
and why do it?
2 NF

Pillars of OOP
MCQS
1-what is the worst case time complexity of the binary tree sort. (O(n2))
2-Physical or logical arrangement of network is __________ (Topology)
3-Which network topology requires a central controller or hub? (Star)
4-What is the full form of COCOMO? (Constructive Cost Estimation Model)
5- _____________ specification is also known as SRS document.(black box)
6-What is a database?(Organized collection of data or information that can be accessed, updated, and managed)
7-Which type of data can be stored in the database? (All of the above)
8-Smallest unit of data in computer(Bits)
9-Which command is used to remove a relation from an SQL? (Drop table)
10-For designing a normal RDBMS which of the following normal form is considered adequate? (3NF)
11-Quick sort is based on divide and conquer strategy (True)
12-public class array
{
public static void main(String args[])
{
int []arr = {1,2,3,4,5};
System.out.println(arr[2]);
System.out.println(arr[4]);
}
}
Answer:3 and 5
13- What are the advantages of arrays?( Easier to store elements of same data type)
14- Elements in an array are accessed _____________ (randomly)
15- What is Software Engineering?(Application of engineering principles to the design a software)
16- CPU scheduling is the basis of ___________(multiprogramming operating systems)
17- Which of the following algorithm implementations is similar to that of an insertion sort?(Binary heap)
18- Given an array of element 5, 7, 9, 1, 3, 10, 8, 4. Which of the following are the correct sequences of elements after inserting
19-. Define Agile scrum methodology.(project management that emphasizes incremental progress)
20- Which of the following part of a processor contains the hardware necessary to perform all the operations required by a com
21-. What is the main function of the command interpreter?(to get and execute the next user-specified command)
22-What does the following piece of code do?
public void func(Tree root)
{
func(root.left());
func(root.right());
System.out.println(root.data());
}Postorder traversal
Answer: Postorder traversal
Interviewer DSA Solution Interviewer

Return sum of even numbers


in an array

Reverse Linked list

Find 2nd highest element of


array.

ed, and managed)

ences of elements after inserting all the elements in a min-heap/max-heap? (same type of question with different values)

e operations required by a computer?(Data path)


ecified command)
OOAD/SE/SRE Solution Interviewer OTHERS Solution
Association /
Composition /
Aggregation What is Redux
Is JS a multithreading
language?

closures in JS

Virtual DOM in JS
sync vs async in JS
why async there in js->
related to multithread
concept Qu
Your role in fyp
let vs var in JS
hooks in react
Event Loop
Express Routers

with different values)


Interviewer
Test Link

OOP Solution
Interviewer DB Solution Interviewer DSA Solution Interviewer
OOAD/SE/
SRE Solution Interviewer OTHERS Solution Interviewer
basic questions tha

OOP, the difference between array, linkedlist.

database indexing. python mixins, python decorators. one-to-one, one-to-many, many-to-many

TEST QUESTIONS
Print 2D array in spiral
all types of joins explain krein with sql queries as an example
check if string is anagram
explain inheritance with code example using constructors
3 SQL queries questions
Interviewe
db joins -
OOP
Total types of
Solution Interviewer DB
queries
Solution r
inheritance
abstraction vs
encap

static - inheritence..

polymorphism
overloading vs overriding
Interviewe OOAD/ Interviewe
DSA Solution r SE/SRE Solution r OTHERS
hash table MVC

API
graph vs tree

bdf dfs

array vs ll

2d array to 1d array

string - common letters find


Interviewe Interviewe
Solution r Coding Questions Solution
find second largest number
r
in array

string is pallindrome or not


flatten a jaggaed array
recursion
Interviewe Interviewe OOAD/ Interviewe Interviewe Interviewe
oop Solution Interviewer DB Solution r DSA Solution r SE/SRE Solution r OTHERS Solution r Coding Questions Solution r
Both are use as blueprint.In
abstraction we have abstract
class and inside abstract class
we can difine abstract methods
which can be accessed in drive
class. we can't make properties
in interface. we cannot make
object of interface as we can not one candy costs one
make object of abstract class. in rupees. if you return three
absctract we have to minimum wrappers, you'll get an
one method abstract but in extra candy. how many
- Abstraction and interface interface we have to abststact all - Transitive - Delete middle node of - Design candies you get for 15 - Swap two integers without using 3rd
methods. Dependency linked List. patterns rupees variable
A static can be method or
variable. A self key world is use
for if you want to acces static
variable in class. A static member for (int i = 0,j=size-count; i
method can be access out side < count; i++,j++) {
class without creating object of indexing,where we - You have an array [3,4,6,7,8,2,3,1] arr[i]=arr[j]+arr[i];
that class.Static methods in C++ apply it on row or and you have a count n such as 4, so arr[j]=arr[i]-arr[j];
can be overloaded but they column and on which Factory and Divide a cake into 8 equal shift first 4 elements of array to the arr[i]=arr[i]-arr[j];
- Static are overloaded or overridden cannot be overridden. bases. - What is BST, Singleton pieces in 3 cuts left ( at the end of array) }
overloaded but can not
overidden. The final keyword is a
non-access modifier used for
classes, attributes and methods,
which makes them non-
changeable (impossible to inherit
or override).

The final keyword is useful when


you want a variable to always
store the same value, like PI
(3.14159...). You have 4 tablets, 2 of one Divide each
type and 2 of other, your task is tablet into half,
The final keyword is called a - Inorder Recursion to eat 2 tablets of one type and eat 4 - find max sum in array and print its
- Final are overloaded or overridden "modifier". normalization traversal Code each. How is that possible? halves index

Func A(int a, float b)


Func A(float a, int b) actually this will give error
becasue compiler has ambiguity SELECT salary
what is happening here? what if I call Func A(1,1). which deciding because both FROM employees
function will get called? parameters match both intances - Inorder, PostOrder, - find query for nth max salary from ORDER BY salary DESC
correct answer is upper Func A will get executed. of overloaded functions ACID PreOrder employee table LIMIT n-1, 1;
I have an array like
1- Func A(x): [2, [2,3] , [4,5,[5,6,7,8], [5,4,
x = x + 10 [7,4]]]]
Func B(&x):
x = x + 15 it can be like this, multiple total clock
sub arrays within an array. angle =360. so
driver code: make this 1d but you cant every hour is
x = 10 use list comprehension or of 30degree.
FuncA(x) built-in functions. simple each hour
print(x) loops but don't use too consist of
FuncB(&x) many loops. 4*15, so for
print(x) answer: use recursion time is 3:15 ,tell the angle each 15 min
between minute needle and the angle is find pair in array whose sum is equal
what will the two print statements print? Views Code in O(n) hour needle. 7.5degree to target in O(n)

I have a sorted array. I have


an element K which I want
to search in it. Apply BST
and search that element
and print the index at which
that element is placed.

Four pillars of oop ,differnce between encapsulation and Here main twist was printing Measure 4 L water from a jar of
abstraction,give examples by writing code. What is transaction index and not BST. 3L and 5L. anagram problem in O(n)
There's a linked list whose
head and tail is not known. I
have a pointer pointing to You have given 25 horses and
any random node. delete have to find top 3 in minimum
assignment and copy constructor.,constructor and that node. you can't races.Only five horses can
destructor. Find 3rd highest salary traverse it. participate in a race. sort array in n
I have an array like
[2, [2,3] , [4,5,[5,6,7,8], [5,4,[7,4]]]]

there's an array it can be like this, multiple sub arrays


[0,2,6,0,-9,0,4,0,-1] within an array. make this 1d but you
make all zeros come at right cant use list comprehension or built-in
Using given table, find and all non zeros(including functions. simple loops but don't use
run time and compile time polymorphism,overloading and the count of negative numbers) to come too many loops.
overriding,using virtual keyword what we achieve,run compile time mn overloading and employees each at left side. use only one answer: use recursion
time or compile time polymphsim. runtime mn overriding. manager is handling loop.
I have a sorted array. I have an
element K which I want to search in it.
Apply BST and search that element
and print the index at which that
element is placed.
binary tree,if there is only
Triggers vs two nodes,is it still a binary Here main twist was printing index
what is oop. and what is class and instance. Procedures tree, and not BST.
Two trains are moving
towards each other
with a speed of
80KM/h. There is a
distance of 160km
between them. There
is a bird on the front
side of first train
which move towards
second train and
return back when the
bird reached the front
of the second train.
The bird speed is
70km/h. What will be
the total distance
covered by the bird There's a linked list whose head and
tail is not known. I have a pointer
diff between drop, pre order,inorder,post
when both trains will pointing to any random node. delete
Four pillars of oop, describe each truncate, delete order,level order collide. that node. you can't traverse it.
there's an array
[0,2,6,0,-9,0,4,0,-1]
one candy costs one rupees. if make all zeros come at right and all
you return three wrappers, non zeros(including negative
Purpose of virtual =0. how to implement you'll get an extra candy. how numbers) to come at left side. use
Abstract & Interface difference manay to many sorting algorithms,any with many candies you get for 15 only one loop.
Static variable and Static function relationship best complexity, rupees
Give max count of numbers having
increasing order.For example 1 3
6,2,5,0 os here 1 3 6 are in increasing
roder small to larger ,so count is 3
you have to correctly label, 3 then again 2 and 5 are also in
wrongly labeled bags in 1 try increasing order so count is 2, and 0
(pick 1 ball from any bag).1 of is single so count is 1, similary if we
them(M) has mix Red or Black have array 2,2,2,2 then again count is
indexs and its any alogorithms can sort in balls, one has only red(R) and 1.So we return max count ,in above
Diamand problem drawbacks log n one has only Black(B) balls. case it is 3.
You have a linked list L1: 1->2->3->4-
>
&
L2: 9->8->

Find their sum and store in new


Diamand problem. If java doesnot allow multiple Muhammad how to apply Difference between Put and LinkedList L3 as:
inheritence, then how diamond problem arise waqas constraints binary search tree Patch. 1->3->3->2
Two trains are moving towards
each other with a speed of
200KM/h. There is a distance
of 400km between them. There
is a bird on the front side of first
train which move towards
second train and return back
when the bird reached the front You have an array say [1,2,-3,-4,5,6,-
of the second train. The bird 1,5,2,-3,-9,6]
speed is 393.75km/h. What will
draw be the total distance covered Move all negative at the beginning
association(ERD) by the bird when both trains will Note:
between entities of Difference in BST, Tree, collide. Another Case: Distance - Don't use extra array
pillars of OOP given scenario Binary Tree between them is 200km - Do it in O(n)
pick 1 heavy ball from 8 balls in
why do we use & in copy ctr paremeters list? bridge entity Difference in graph and tree 2 attempts Mirror a BST
you have two candles, each
can burn on both ends. Each
candle take 60 minutes to burn
when burn from one side only,
similarly it takes 30 minutes if
4th max salary? why postorder, preorder, inorder burn from both sides. Estimate Tell the count of each element in an
memory leakage vs dangling pointer did you use distinct in traversal (not code. A tree 45 minutes by using 2 such array in O(n)
query? any other way was given I was suppose to candles. you have no time, or
https://aticleworld.com/dangling-pointer-and-memory-leak/#:~:text=Generally%2C%20daggling%20pointers%20arise%20when,to%20deallocate%20the%20allocated%20memory.
to find 4th max? give the output) any scale or measure. Don't use Maps
You have 10 steps(seerhi) to reach
destination, and you can take only 2
or 1 step at one time. Find the
Given a singly linked list, number of combinations/COUNT of
write a function to find out if steps you can take to reach
why indexing? make the linked list is a destination
an index? which palindrome, but using only
column do you prefer one iteration and within Hint: Use recursion
real life examples of OOP's Pillars for indexing? O(N) time bound. Also tell it's complexity
You have some amount x say 500,
and some denominations say
5,10,20,50,100.

Tell the count of combinations of


denominations to make 500 Rs.

move zeroes to right side of Hint: Recursion


do an inplace swap join vs subquery it the array in O(n) Tell complexity
you have to design a class
of queue using stacks, how
will enqueue/push and
types of inheritence Join query on 3 tables dequeue/pop work?
you receive a link list and
an integer n, you have to
reverse list in chunks of n!!
multiple inheritance is not supported by every language! Right outer join using i.e. 1 2 3 4 5 6 7 and n=3
why? diamond problem? left outer join. result => 3 2 1 6 5 4 7
Difference between
Desgin Patterns? Put and Patch. Delete a node of BST.
What is header in Merge two sorted arrays
What is Singleton pattern? how do you implement it? https request. into new array.?
Difference between reverse a linked list? using
MVC Get and Post, any data structure?
Can we do GET,
POST, PUT, DELETE reverse linked list in O(1)
defines pillars of OOP by an Example? using POST only? space complexity?
You receive a sorted array.
i.e: 1,3,5,6,7,9 and a target
= 8 you need to return the
indexes of the number
which sum up to target
Default port of http number in O(N) time and
use of "virtual" keyword? and https. O(1) space.
Based on given number,
print even or odd. No if else
or ternary operator. Print
Even or Odd without using
the modulo operator. Can
types of polymorphism? define indexing? table has million of record with index? use if statement.
Find distance between to
why OOP? cluster or non cluster index nodes in a BST.
Populate a BST from a
why Inheritence? triggers given unsorted array.

Flatten a nested array. e.g


Input: [1, 2, [3, 4, 5, [6]], 7,
8]
why Inheritence? store procedures Output: [1, 2, 3, 4, 5, 6, 7, 8]
Find Intersection Point in
Real life examples of OOP's Pillars ACID Linked List
Check whether the link list
Difference between Abstraction & Encapsulation transaction is a palindrome or not?
a number k, sum and an
array is given, you have to
find whether the sum of
consecutive k elements
types of polymorphism Views equals the sumq
Product of Array except
Operator Overloading and Operator Overriding write query to return 2nd last record of table itself
There is a linkedlist consist
of nodes.
struct Node
{
int data;
Node * next;
Node * bottom;
}
Each node has 2 pointers,
next pointer and bottom
pointer.
You are given a head of the
linked list, you need to find
the sum of data of all the
nodes.
e.g:
1->1->1->1
|
1->1->1->1
|
1->1->1->1->-1
|
1->1
|
1
|
1->1->1
- Function overloading and function overriding |
- Can we achieve function overloading by just changing 1
the return type? 4 maximum salary
Print Even or Odd without using the modulo operator. find middle of linked list in
Can use if statement. Walmart O(N)
Detect and Remove Cycle
can we achieve overloading in child class find maximum salary for each department in Linked List. devsinc 2nd technical interview:
Difference between
shallow vs deep copy Put and Patch. Mirror the BST flatten array
friend function ? why we use friend function? can we replace right join with left join Pre Order Traversal 2d matrix diagonal print
BFS traversal 3rd max salary
twoSum problem with O(n) count of repeating elements in
time complexity array
sum of all the nodes of func that return 3 on 2 and vice
binary tree versa
write a function such that if
we pass 100 it returns 101
and if we pass 101 it returns
100 without if else and
ternary operator
you have to transfer data
from 2 databases A and B
to a fixed size array. you
have to figure out which
data comes from which
database analytical:
1 factory 10 machines making
coins of 10g each, 1 machine is
making coins of 9g, identify that
machine with the help of a
weight machine but can check
reading on weight machine
delete node once
return nth to last node
2 blue pills 2 red pills, blind
man has to eat one of them
every day and night how will he
return 2nd last node identify them
Delete node whose whose
address is given
There is a linkedlist consist
of nodes.
struct Node
{
int data;
Node * ptr1;
Node * ptr2;
Node * ptr3;
Node * ptr4;
}
Each node has 4 pointers,
meaning it can have
maximum of 4 attached
nodes. Any of the pointers
can be null.
You are given a head of the
linked list, you need to find
the sum of data of all the
nodes. (Use Only
Recursion)
In what type of data to be
searched, traversal of BST
will be in worst case.
you have a unsorted array
from 1 to 100 with one
number missing, find that
number
InOrder Traversal using
Recursion
Find all non repeating
elements from Array O(N)
FInd 2nd largest number in
array using 1 loop
Find frequency of
characters in string . time
complexity should be O(n)
and space complexity O(1)
Vendor machine cash
return algorithm.
OOP Solution Interviewer DB Solution Interviewer
They not only check if you can come up with a solution or not but they also want the most optimized solution possible in term
Be aware of the edge cases and try to 'PRACTICE' all the questions present in the 2023 and 2022 sheets as they repeat as
DSA Solution Interviewer
ost optimized solution possible in terms of time and space complexity. Some of the interviewers are also interested to know how did you act
23 and 2022 sheets as they repeat as well.

Level order traversal of a binary tree. BFS

Given a binary tree, determine if it is a


DFS
valid binary search tree (BST)
//space optimized dp
iint GetFibonacci(int n) {
if(n==0){
return n;
}
if(n==1 || n==2){
return 1;
Find the nth fibonacci }
int a1=1;
int a2=1;
for(int i=3;i<=n;i++){
a1=a1+a2;
swap(a1,a2);
}
return a2;}
O(Nlgk) Solution, Using Heap,
Merge the K Srorted Linked Lists Via Binary Merging (As in
merge sort)
3rd largest in bst

1st Interview Qs
1. Given a BST. There is a next pointer in
every node of the tree it should point to the Interviewer:
right node in the same level and the last Rahim ul haq
element of each level should point to Null.

2. Given a string with ternery operators


e.g. "a?b:c" convert it into a tree
a
/ \
b c
Interviewer:
Rahim ul haq
"a?b?d:e:c"
a
/ \
b c
/. \
d e

1. Given a string of ternery operator, check


Time O(n), Space O(1) try to
it is valid or not. e.g. "a?b:c" (true) "a?b? Muneeb Zia
focus on operators only
c:e:f?g" (false) a?b?c:d:e(true)
2. A multilevel linkedlist is given. Convert it
two pointers approach Muneeb Zia
into flat(single level) list.
Interview 2:
1. Given an array and average count the
Muneeb Zia
pairs who's average are equal to the given
average.
2. Given a Linked list reverse linked list in k Muneeb Zia
chunks.

Interview 3:
1. Given a binary tree every node of tree
should have a property of siblings which
Mohammad
will point to its next child.
Usman
Example
1
2 3 output: 1->2->3->null

2. Give a string containing valid xml/html


code and convert it into a k -child tree.
Example
"<html><body><a></a><a></a></
Mohammad
body></html>"
Usman
Output: html
|
Body
/ \
a a

Interview 4:
1. Given two strings find they if are
Wasiq Malik
anagrams
2. Reverse k sorted linkedlists Wasiq Malik
Online Tech Screen (SWE)
1. In a binary tree connect left nodes to the
neighbour right nodes at the same level.
e.g.
Input Tree
A
/\
B C.
/\ \
Rahim ul Haq
D E F

Output Tree
A--->NULL
/\
B-->C-->NULL
/\ \
D-->E-->F-->NULL
2- Given two arrays, find all pairs whose
sum is X. e
Input :
arr1[] = {1, 2, 4, 5, 7}
arr2[] = {5, 6, 3, 4, 8}
Rahim ul Haq
X=9
Output :
18
45
54

Full Loop Assessment


1. Given a binary tree every node of tree
should have a property of siblings which
Mohammad
will point to its next child.
Usman
Example
1
2 3 output: 1->2->3->null
2. Give a string containing valid xml/html
code and convert it into a k -child tree.
Example
"<html><body><a></a><a></a></
Mohammad
body></html>"
Usman
Output: html
|
Body
/ \
a a

//space optimized dp
iint GetFibonacci(int n) {
if(n==0){
return n;
}
if(n==1 || n==2){
return 1;
Muhammad
Find the nth fibonacci }
Ahmad
int a1=1;
int a2=1;
for(int i=3;i<=n;i++){
a1=a1+a2;
swap(a1,a2);
}
return a2;}
Find the 3rd largest from bst in O(lgn) time Muhammad
3 pointers approach
and O(1) space Ahmad

Given a Binary Tree, Count the number of


nodes whose average is equal to the Recursion Zaid Tariq
average of that node value.
Remove all consecutive duplicates from A
string for example abxzzzxyz = > abyz.......
this is because when z is removed it will
Stack Zaid Tariq
become abxxyz and now xx is removed
and abyz is left so no consecutive char is
left in this string
Return the triplet whose sum is maximum in an array" with "Return the triplet(consecutive) whose sum
A binary tree is given, and we alter the
Node class, and add a new member "Node
* next" , you have to initilize this member
with either null, or the the right node in
same level
Reverse last n nodes in link list
A string is given containing parenthesis,
valid or invalid, you have to return the max
sum of consecutive valid braces
Return the count of maximum nodes in a
root to leaf path
Delete last occurrence of an item(number)
from a singly linked list
Find the count of distinct number of pairs
in an array whose product is equal to a
number K. Note: (a, b) == (b, a)
Given an integer n, return its
corresponding excel column string. A
dictionary of alphabet is also provided. i.e;
{1:"A", 2:"B", 3:"C", 4:"D", ...., 26:"Z"}.
Sample Tests: For n=1 => Output: A, For
n=2 => Output: B, For n=26 => Output: Z,
For n=27 => Output: AA, For n=52 =>
Output: AZ, For n=703 => Output: AAA
and so on.
Given an array/string print all possible
palindromes.
Find the first repetition in linked list
Given a linked list and a chunk size,
reverse the linked list in chunks example
1,2,3,4,5,6,7,8,9 -----> 3,2,1,6,5,4,9,8,7
Given two binary trees, create a new tree
that at every node contains sum of
corresponding nodes of other two binary
trees.
Given a binary tree and a value n we have
to check if sum of values from root to leaf
nodes exist that matches the given value n
Given a string we have to return first non
repeating character e.g. Input: 'Educative'
Output: d, Input: 'Banana' Output: B
Given a link list we have to remove
duplicate nodes in unsorted list in O(N)
Write function that take n as a parameter
and return prime numbers equal to n.
Given a string we have to return frequency
of every word in string
DFS,BFS
Find the nearest multiple to x in the table
of n. for example n= 4, x = 9, output = 8,
handle negative inputs as well
Two linked list heads are given, each of
which represent a non negative reversed
number, you need to return a linked list
that is equal to the sum of numbers
represented by the two input linked list. for
example: ll1 = 1->0->2, ll2 = 2->1->5, ll to
be returned = 3->1->7
Write a function that finds out if a given
number is strong or not, a number is
strong if the sum of the factorial of its digits
is equal to the number itself, e.g 145 is a
strong number because 1!+4!+5!=145
Write a function that will rotate left a
linkedlist by n
Write a function that finds the path in a
binary tree that has the greatest sum.⁸
Find indxes of 2 numbers whose sum is
equal to given number in array O(n)
You have given a sorted array of unknown
size how would you search an element
from array
Find 3rd maximum from BST without
Recusrion
Find 2nd maximum from binary tree (NOT
BST)
Given a value N print its fibonacci value
Mirror the binary tree
There is an 2d array (like maze) which
have some blocked indexes ,You have to
find path to specific value K in array
Find a first missing Natural Number from
an Array (unsorted)
Find all the possible paths in maze from
source to destination.
Rotate the linklist to left upto N rotation. if 1
2 3 4 5 is linklist and n= 2, then it become
34512
Find max value in binary tree.
You have given a linklist, which contains
even and odd value in data. write a
function that reverse the consecutive even
node whose value are even. and don't
alter the odd node. for example, 1 2 3 4 6
8 9 10 12 7, then after reverse, linklist
should be 1 2 3 8 6 4 9 12 10 7.
Write a function that finds max sum of
unsorted Array, no consecutive elements
involve (dynamic programming)
Sort a linked list
Given a binary tree return the longest path
from root to leaf as an array of nodes
Given an string s = "{{}}[(]))aabb" and and
array = ["()", "{}","[]", "ab"] return balanced
or unbalanced for each pair e.g. ():
"unbalanced", {}: "balanced, []: "balanced",
ab:"balanced" in O(n) and without using
stack queue
Given a binary tree where each node can
only have a digit (0-9) value, each root-to-
leaf path will represent a number. Find the
total sum of all the numbers represented
by all paths. e.g. A binary tree has
following three paths 1) 1->7 2) 1->9->2 3)
1->9->9 than answer should be
17+192+199 = 408
Input is an array of integars. Add all the elements in an resultant array from the input array such that all the elements after that
Input is an array. Length of the array
represents the count of sticks. Each index
represents the length of the sticks. Return
how many unique triangles can be formed
using it Side Note: A triangle can only be
formed when one length is less than the
sum of other two (c<a+b)
Flatten a multi-level linked list
OOAD/SE/SRE Solution Interviewer Full Loop Assesmenr Solution
ers are also interested to know how did you actually come up with the solution (the intuition behind it).

Several other Medium and


Hard level leetcode problems

Find First smallest missing natural number from an unsorted array.

Consider a row of n coins of values v1 . . . vn, where n is even. We p

Find the nth number in Fibonnaci Sequence.


Find the third highest node in BST using O(1) space and in O(n) time
DeleteAnsectors
Note: the last occurence of an element
will also include from
the node a linked
itself list of paren
+ the chain
Follow Up: What if the duplicate nodes are present in the binary tree

In a square grid of 10x10, you have to find a path from 0,0 to 9,9 x2
How do you find height of a binary tree? x2

Find kth largest number in array, cost sould be less than O(kN)

Verify if a binary tree is BST or not?

Remove nodes with duplicate values in a sorted link list


turn the triplet(consecutive) whose sum is maximum in an array
input array such that all the elements after that element is less than it.
Interviewer Coding Questions Solution Interviewer

Given an array of integers, e.g.


[-3, 2, 0,-5,1, 5], find all the
triplets where sum = K. For K=0 Three Pointers
output is (-3,2,1), (-5, 0, 5) after sorting

number from an unsorted array.

v1 . . . vn, where n is even. We play a game against an opponent by alternating turns. In each turn, a player selects either the first or last c

using O(1) space and in O(n) time


ment from
e node a linked
itself list of parents of the nodes.
+ the chain
des are present in the binary tree

to find a path from 0,0 to 9,9 x2

st sould be less than O(kN)

s in a sorted link list


cts either the first or last coin from the row, removes it from the row permanently, and receives the value of the coin. Determine the maximu
coin. Determine the maximum possible amount of money we can definitely win if we move first.Solutions: - https://www.geeksforgeeks.org/o
s://www.geeksforgeeks.org/optimal-strategy-for-a-game-set-2- https://www.geeksforgeeks.org/optimal-strategy-for-a-game-dp-31
or-a-game-dp-31
Interviewe
OOP Solution r

oop basic questions


What are pillars of oop https://medium.com/@hamzzza.ahmed95/four-pillars-of-object-oriented-program

Abstraction vs encapsulation

Association

Aggregation

Composition vs inheritance

Types of inheritance

Define multiple and multilevel inheritance

What is operator overloading

What is function overloading


Operator overloading vs function
overloading

What is function overriding


What is polymorphism and give its real life
example
Static vs dynamic polymorphism
Describe public private and protected
inheritance
Define frnd functions why we use this
Can we make constructor and destructor
private
What happens when we make them
private
What is virtual keyword why we use it .
What is diamond problem and how we can
solve it
What is virtual vs pure virtual function
What is abstract class
What is interface class
What is static member function and static
data member
Can we access non static data members
in static function
Dynamic vs static binding
What is copy constructor
What are templates
Class vs struct
What is virtual table in oop
Difference between private and protected
can we overload constructor and
destructor
Composition vs aggregation
What are frnd functions how they are used

Third/final Technical interview (With Rohail


Akram)
All discussion on FYP
-FYP idea
-FYP Schema
-Scenerios (if this happens then change in
schema etc)
-Query related to that schema
-Coding Question(Related to FYP)
OOP pillars in details
Polymorphism
Static and Dynamic Polymorphism
Overriding
Difference b/w overloading and overriding
Inheritance
Type of inheritance
Access Modifier/ Specifier
Diff b/w Abstraction and Encapsulation
Diff b/w Abstract Class and Interface
Diffference between class and struct
Can we declare a static class
Dynamic vs static binding
What is copy constructor
What are templates
Heap memory allocation vs stack memory allocation
What is virtual table in OOP?
Difference between private and protected
Can we overload a constructor and destructor?
Composition vs aggregation
Schema of Instagram
Find missing element in array
DB Solution Interviewer DSA Solution

sorting algos
Heap memory
normalisation complexity
allocation vs stack
crud queries memory allocation
- recursive
Schema of Instagram solution

array vs LinkedList, why


What is dependency injection LinkedList
Implementation of cyclic
dependency Difference b/w tree and graph

What is cyclic dependency


and give its example can we convert a tree into graph and vice versa

What is dependency injection


why we use this

joins

- Normal forms

- ERD/schema
what is indexing, it's
types and why we use
it?
schema of an e-commerce
website Maria Rafique

query to find the customer having


maximum order in march Maria Rafique

Normalization
Why Normalization is necessary?

Can there exist a situation where denormalization is required instead of normalization


Can we store a binary tree in db

How many tables we require to store a binary tree in table


How we can regenerate a binary tree from that table
First, 2nd and 3rd Form of Normalization

Partial Dependency
Transitive Dependency
Indexing
Clustered and unclustered indexing

Erd(fixtures and teams) than write queries on that ERD

Draw ERD of your FYP


Interviewer -OOAD/SE/SRE
jo framework use Solution Interviewer OTHERS
kiya ous may use
hony waly design
patterns fyp related
Design Patterns -
- FYP/your
JS singlerole
threaded/event
Singleton Pattern loop

- node single
Maria Rafique Difference between Proxy and Prototype design Pattern threaded?
Short and long term
Adapter Pattern goals asked
FYP discussion -> 3rd
party integrations in
FYP, github workflow
ph and vice versa If a process is interrupted during execution where its state an
Assessment of decision
making -> choice of
subjects in matric,
intermediate -> Reason
of resign from internship

Expectation from your


first company (other
than salary)

tech Stack interest

situational question
related to change in web
tech stack in market and
how to adapt that
change within the
project and team that is
skilled in old tech stack
what is React, and why
React?

What are props?


Difference between SQL
and no-SQL databases,
when to use SQL, when
to use no-SQL,
advantages and
disadvantages?

Third Interview

Create ERD for FYP


Query on FYP ERD
OS

Directed Acyclic Graph


Shared Resources
Mutual Exclusion
Binary Semaphore

Context Switching
Solution Interviewer Coding Questions Solution Interviewer

anagram
array basedcode
O(n) array
given thi jnka sum 10 ho wo

Aik probability k sawal th


Find the sum of numbers
which are arithmetically
correct
a function to calculate the
square root of a number Maria Rafique

a function which returns 3 if


receives 4 and returns 4 if
receives 3. Maria Rafique

Favourite data structure and what problem it solves

Insert in middle of a doubly linked list

Two number in a array with minimum sum

Difference between Array and Llink List

Maria Rafique Difference between Stack and Queue and their implementation

Maria Rafique Prirority queue with its implementation

Maria Rafique Find an object from an array of object and delete it without affecting the order of object in arra

Detect loop from link list and delete it.


Parentheses valid check

Write a program to detect a loop in a linkedlist


Write a program to find the two numbers in an array which adds upto the given target and ret

Rohail Akram
Rohail Akram
hout affecting the order of object in array

which adds upto the given target and return their indexes
Q1: shape is a parent class square and circle are child classes
Shape *sh=new Circle() ;
Is it valid statement? And explain why?

Q2: what is Singleton design pattern and how do we implement it?

Q3: Explain Observer design pattern

Q4: what is denormalization and what are its advantages?

Q5: A customer paid a bill by checkingout on website. He is your website customer. And the status of payment become paid. T

Q6 write a query to display product name and category name where product ID is 1. Tables name are Product, Category and P

Q7: Design database of university its primary keys foreign keys of student, teachers and courses and also write usecases

Q8: print 2dimensional array of NxN size using one loop and one variable

Q9: Given an array of five positive integers. Calculate the mininum and maximum sum of 4 out of 5 integers. Calculate this in m

Q10: replace a digit in a number without using string or character typecasting


Example input=replace(423567,6,0)
Output=423507

*Solutions* :

1st :
The pointer
Shape * s = new Circle();
As you already mentioned, s is a pointer-to-Shape in this case. The statement declares s, and assigns a pointer of type Circle t

Because C++ is a polymorphic language, s does now point to an object of type Circle. If Shape has virtual functions that are ov

2nd:
The singleton pattern is a design pattern that restricts the instantiation of a class to one object.

3rd:
The Publish/Subscribe pattern, also known as pub/sub, is an architectural design pattern that provides a framework for exchang

4th:
Normalization is the process of organizing data in a database. This includes creating tables and establishing relationships betw

Benefits of Data Normalization


Reduces redundant data.
Provides data consistency within the database.
More flexible database design.
Higher database security.
Better and quicker execution.
Greater overall database organization.

7th: sql injection attack:


SQL injection (SQLi) is a cyberattack that injects malicious SQL code into an application, allowing the attacker to view or modify
A successful SQL injection attack can result in unauthorized access to sensitive data, such as passwords, credit card details, o

How to Prevent SQL Injection


Use Stored Procedure, Not Dynamic SQL.
Input Validation

10.for(int i = 0; i < rows * columns; i++)

{
int row = i / columns;
int col = i % columns;
cout << arr[row][col] << " ";

12. int replaceDigit(int x, int d1, int d2)


{

int result = 0, multiply = 1;

while (x / 10 > 0) {

// Take remainder of number starting from the unit

// place digit

int remainder = x % 10;

// check whether it is equal to the digit to be

// replaced.if yes then replace

if (remainder == d1)

result = result + d2 * multiply;

else // else remain as such

result = result + remainder * multiply;

// Update and move forward from unit place to


// hundred place and so on.

multiply *= 10;

x = x / 10; // update the value

// check whether it is equal to the digit to be

// replaced.if yes then replace

if (x == d1)

result = result + d2 * multiply;

else // else remain as such

result = result + x * multiply;

return result;
}

**Send By Another Student **

Pf:
Class
Parent class child class
Polymorphism
Db:
Joins
Er diagram
Queries
Normalization (advatages disadvantaged)
How to optimise a querry
Sql injection
Dsa:
Array and string manipulation eg
Handling 2 d array
Finding min max
Find the count of specific number with minimum time complexity
Find and replace specific number

**Send By Another Student **

Accessors, Mutators, Add Operator

PB-8 in Python
How can we measure the size of project

What is agile and xp

Threads, Binary Seamaphors

TCP UDP

Hiw will you tell your Grand Mather you are doing Software Engineering on Phone call provided she has no education and she

How can we implement the switch structure of C++ in Python

Detailed discussion on FYP.


What, need, role of each member

MAC vs IP Address

Diff b/w stack and linked list

Diff b/w graph and tree

What is recursion and what we need to make sure before implementing it

What we need to do before merge sort

Pickling in Python

What are the non-functional requirements of a project give some examples

What is quick sort

Diff b/w Aggregation and association

Diff b/w encapsulation and abstraction

Diff b/w POST and Get requests

HTML tags
Br, tb, td,

Diff b/w tuple and attribute

What are triggers

Diff b/w primary and secondary key at least 2 to 3

Diff b/w 2nd NF and 3rd NF


Diff b/w inheritance and polymorphism and their benefits

Joins inner vs outer

What is the most important stage of waterfall model

How can we measure the efficiency of two algos.....

Functional points in project

Filtering in Python

What is number and why do we use it

Some questions from design pattern and JavaScript are also asked lekin Maine JavaScript pe kaam nhi kya howa aur DP padh

Diff b/w === and ==

What are DDL, DML, DQL with example

They'll ask you to score your top 3 technologies/languages and then questioning will be accordingly

It was around 2 hour long interview with CEO TechnoSoft

Be sure about the version of DBs etc you are using


of payment become paid. There is no difficulty in the process. How to maintain data Integrity.

are Product, Category and Product Category

nd also write usecases

integers. Calculate this in minimum time complexity

gns a pointer of type Circle to it. This implies that Circle is derived from Shape.

virtual functions that are overloaded by Circle, calls to those functions on s will be redirected to the overloading Circle implementation.

des a framework for exchanging messages between publishers and subscribers. This pattern involves the publisher and the subscriber relyi

ablishing relationships between those tables according to rules designed both to protect the data and to make the database more flexible b
he attacker to view or modify a database.
words, credit card details, or personal user information.
has no education and she is using Nokia 3310 mobile
m nhi kya howa aur DP padhi nhi is lye further questioning nhi hoi
Circle implementation.

sher and the subscriber relying on a message broker that relays messages from the publisher to the subscribers.

he database more flexible by eliminating redundancy and inconsistent dependency.


Procedure
Analytical,db,oop,dsa Intended Solution
Uske baad agar ap wo clear krlete to 2 questions coding k denge wo almost 30-40mins time hoga

Question
Assessment
Given Questions
two strings find if a string can be equals to
other string by inserting, deleting one character only.

Given an integer array find if the array has cycle in it

1.FYP sa related question thay

SQL
1.Having and where ka different
2.Moat expensive function in sql
3.Aggregate functions
4.One sql query(FYP sa hi related ek simple table ki example di thi or us pa run karni thi)

OOP
1.Inheritance, polymorphism, encapsulation, abstractions ka baray ma pocha tha
2.Real life example of polymorphism
3.Types of polymorphism and their example

JS
1.How to clone a object in JS (deep copy)
2.What is closure
3.State and props and difference between them

Coding question
There were 2 coding question have to attempt one of them

1.given list of string find the one with maximum size


2.given 2 strings find if they are anagrams

For database if you are familiar with mongo db to us ma sa bhi question pochay ga
Written test me 30-35 MCQ they or 2 technical questions they..

1 shyd ye tha k ek array hai jiske hr index pe next index ka address pra hwa hai..
aapne check krna k array me koi cycle ban rai hai ya ni..

or second question tha k ek array me strings pri hain or apne check krna k hr string me koi bi alphabet delete, update ya add kr
agar bnti hai to btana kis operation se bni hai
jese agar CAT string hai to array me cate, cast, acat waghera hain..
apne btana kia scene hai hr string ka 0(n) me

uske baad technical interview hwa tha jisme sarey basics concepts they
oop dsa or database k..
2-3 queries bi likhwai theen..
phir 2 technical questions they..
1 to tha k user koi input dega say n = 5 or aapne triangle print krna aese
112123123412345

.. phir analytical bi poochey tha


woi jug wala question k paani bharna waghera

phir HR ka fazool sa interview tha k strengths kia hain weakness btao ..


5 saal me kia teer maar lo ge.. salary expectations kia hain..
work environment kesa hna chahie is trh ka hr fazool sawal tha

phir CTO sb tasreef lay unho'n ne phla wala written test khola samne or uspe apke solutions discuss kiye
k apne ye q kiya apne approach sai thi ya galat thi waghera..
or phir CTO ne zero se interview lena start kiya oop, db, dsa k questions + database ki query thi k table bnana jispe facebook k
or bi koi technical question they yaad niphir finally CEO k sath interview tha or google se offer agyi mjhe 80k ki

2 arrays of integers are given find the 2nd array elements that are not in 1st array
Aur phir oop ma access modifiers poche aur poocha agr 1 class ki privage members ko access krna ho to kese krte access
Iske bad db ma se groupby ka sawal poocha aur iski query likhwi
Dsa ma sa linklist aur array ma difference aur uske bubble sort poocha
Interviewer

Mubarak Ahmad

Mubarak Ahmad
Mubarak Ahmad
Mubarak Ahmad
Mubarak Ahmad
Mubarak Ahmad

Mubarak Ahmad
Mubarak Ahmad
Mubarak Ahmad

Mubarak Ahmad
Mubarak Ahmad
Mubarak Ahmad

Mubarak Ahmad

Mubarak Ahmad
Mubarak Ahmad

Mubarak Ahmad
koi bi alphabet delete, update ya add kr k hmari relavent string bnti hai ya ni..

tions discuss kiye

query thi k table bnana jispe facebook ka friend request wala system save ho sara..
e offer agyi mjhe 80k ki

Arsalan

access krna ho to kese krte access


intro
fyp
diff btw oop and structural programming
classes and objects
four pillars in detail with real word example
diff between abstarction and encapsulation
virtual func and pure virtual functions
multivel inheritence
Their is an app whatsapp isme user ki profile h...ar dp hide krni h kase krenge... whatsapp ki all possible classes kia bnegi....co
diff btw arrays and linkedlist
screen share kr k editor pr code likhna tha aik k hmare pas func h usmai sirf aik node a rha hmare pas koi head nai h koi ar nod
Normalization in detail
indexing in detail(type ) benifits etc
stored procedure with e.g
triggers with e.g
views
diff between view and stored procedure and when to use them
diff between user defined func and stored procedure
joins outter inner equi natural
dependency injection
partial dependency
transitive dependency
if you have large database and there are so many joins and sunbqueries there are indexing too in it and now you have to write

Slowest key press


Balance parenthesis
(hacker rank)

Folio3 interview 1 questions


Interviewer: Usman majied
-Intro
-Pillars of oop
-Oop vs functional programming
-Types of polymorphism
-Encapsulation kese achieve hoti he
-Dependency injection
-Diamond problem
-Singleton pattern with use case
- given an array(sorted or unsorted) and a target! Return indexes which will sum to target in O(n)
-given 2 arrays find duplicate elements in them
-customer,orders, order details are the tables write a query to give ordersdate and customer names between 1st feb 2022 and
- cake k 8 pieces krne 3 cuts me
sible classes kia bnegi....contact details kase store hongi....in classes ka apa mai relation kia hoga one to many etc...ar chat history mainta

pas koi head nai h koi ar node nai pta hme...sirf aik node h hmare pas hmne usi node ko delete krna h ase k linked list maintain rhe...sirf jo

and now you have to write a querry ...lkin query ase likhni h k hme fast retrieval ho ske...tu kase likhenge possible solutions btae...

between 1st feb 2022 and 1st dec 2022


y etc...ar chat history maintain kase krenge hr day ki...

ked list maintain rhe...sirf jo node func mai a rha wo del ho jae. baki sb wse hi rhe....

ble solutions btae...


DSA
Given a linked list delete its middle node

Given a string "[(){}]" tell whether its a balanced brackets or no


Output : 5 4 7 1 2
i.e print in pairs 1st and last, 2nd and second last and so on,

Find Longest Palindromic subsequence or a sequence in a string

Question #1
def SpeedoMeter(number):
# A meter counts the distance covered but a fault with digit 4, so it misses any number with digit 4 in it
# A Distance on meter is given find actual distance
For example:
number: 11
Actual Value: 10
only 4 is missing
Number: 51
Actual value: 37
missing : 4,14,24,34,40-49
Question #2
Delete middle of linked list
e.g.
11->5->4->3->9
ans: 11->5->3->9
Question no 3:
Climb():
#number of stairs is given, a person can move to 1 step of 2 steps at a time, we have to find combinitions of how many ways a
for example
1 stair only 1 way
2 stairs 2 ways (1+1 step or 2 steps)
3 stairs 3 ways(1+1+1 or 2+1 or 1+2)
4 stairs 5 ways(1+1+1+1 or 2+1+1 or 1+2+1 or 1+1+2 or 2+2)
Question no 4:
Reverse a linked list using recursison
Question no 5:
Match Pairs
A list of odd numbers is given 2 times. Only 1 number occurs 1 time, find that number
For example 9 11 13 3 11 9 13
Ans 3
Q1. Check if given number is an Armstrong or not. Armstrong is a number in which sum of each number raise to power total co
Q2. Given two linked lists, add the second one in the middle node of first list. E.g 1-2-3; 4-5
Result:1-2-4-5-3
Q3. Write a method toGenerate a random number without using any built in random generator method
......
Rest are the basic oop,db, dsa concepts

Interview ma sawal thy k OOP kiu bnai thi, zaroorat kiya thi.
Abstraction aur Incapsulation ka faraq btao. Private Memeber ko access krwao (getter setter).
DS ki types aur BST aur Graph kya hotay hain. BST ma insertion krwao code likh k.
Given BST ko check kro valid ha ya nhi, fer apna code dry run kr k btao.
Red Black tree, Sparse Matrix, DP ka pta ha?
Joins Konsay hotay hain. Joins k nuqsanat.
BST ma max kitny nodes hotay hain. Inka kaam PHP aur Ruby on Rails ka ha, Python Node nhi krtay ye log bilkul b.
Naam ma HeadQuaters likha ha, laikin andr siraf 4,5 loog bethay hotay hain.
Link Interviewer

so it misses any number with digit 4 in it

teps at a time, we have to find combinitions of how many ways a person can climb up

1 time, find that number


is a number in which sum of each number raise to power total count of numbers present in it equals itself e.g 371=3^3+7^3+1^3
ode of first list. E.g 1-2-3; 4-5

ng any built in random generator method

ko access krwao (getter setter).


ion krwao code likh k.

y on Rails ka ha, Python Node nhi krtay ye log bilkul b.


hay hotay hain.
Database
Name, Id, Salary. Write sql query to
set salary of Max as Salary of Lucifer

What are triggers and its types? Why they are used?
Difference between in and between operator
2. Stored Procedure?
3. Simple Join queries
sent in it equals itself e.g 371=3^3+7^3+1^3
Generally asked questions in interview
Can you tell us a little bit about yourself?
What are your strengths and weaknesses?
Why do you want to work for this company?
Why are your achievements?
What are your short-term and long-term career goals?
How do you handle stress and pressure?
How do you prioritize your work?
What motivates you?
Can you give an example of a time when you had to handle a difficult situation?
What is your leadership style?
How do you work in a team?
What is your approach to problem-solving?
Can you describe a time when you had to adapt to change?
What are your salary expectations?
Do you have any questions for us?

Some other questions


What are some of your hobbies or interests outside of work?
Can you tell us about a time when you went above and beyond for a customer or colleague?
How do you stay organized and manage your time effectively?
What do you think are the most important qualities for success in this role?
How do you stay up-to-date with industry trends and advancements?
Can you describe a time when you had to persuade someone to see things from your point of view?
What kind of work environment do you thrive in?
How do you handle constructive feedback or criticism?
Can you tell us about a time when you had to make a tough decision?
What are some of your favourite books or resources for professional development?
How do you handle conflicts with coworkers or supervisors?
Can you give an example of a time when you had to think creatively to solve a problem?
GOSAAS Drive Link and Guidelines
Drive https://drive.google.com/drive/folders/1O8GE4AVyLCyU1BdX-l1csiLr7I4F6-tW?
Some practice questions related to gosaas...
time will be tooo short so 1st answer that
comes in mind mark it and move forward
otherwise question rh jaenge...test k 4 portions
h ... last portion mai paragraphs honge lengthy
ar same time bht km hoga uski tip ye h k
options phle prh le ar pargraphs mai bird eye
view mai jo option wha match ho rai hu
pargraph se usai click kr de.

OOP

Solid Principals
Pillars of oop

Abstract vs interface
Can abstract class extend single or multiple abstract classes?

Real world examples of objects, OOP and four pillars


by

DB DSA

There were three coding


problems. Have to do code in
Google docs file which is
ACID shared by screen with Him.
Synchronization
1. Two arrays a and b. a is
Mutex Lock (OS). How used in db. subset of b. there's only one
And also give a real world element that is not in a but in
example apart from coding. b. Find that element.
Arrays are not sorted.
He asked in all cases. O(n2) ,
nlgn and O(n)

2. Maximum sub array


problem to find maximum sum.

3. Rotation of linkedlist in o(k).


Do rotation even if the index is
greater. Keep repeating it.

Language doesn't matter. Do


puesdo code and dry
run and explain.
Analytical
Ratio k 2 3 atay bus
logical e.g, 30
workers 15 days me
1 kaam complete kr
rhy to 15 workers
kitne din me
kreinge etc etc.
EF
MVC
ADO.NET
Onsite Test
Sql Server 1) Interface vs abstract class with example
2) Polymorphism (example must be from the room you are currently sitting.)
FYP 3) Class, object, reference ma difference
4) Procedures in SQL
Oop k basic sawal 5) 2 tables ma many to many relationship ko 3 tables ma convert krna tha, aik n
6) BinaryEquivalent ka function
DB queries (outter join, sub query) 7) Palindrome (string must be of 5 char length)

LinkedList insertion at any position 8) code ki output btani thi


Output:
Ali
Zia

9) code kia kr raha


Ans) Bubble sort ka algo tha jo array ka sort kr raha tha ascending order ma.

10) I have forgotten :)


you are currently sitting.)

s ma convert krna tha, aik new table ma dono ki ids rkhni.

tha ascending order ma.


Link
OOP Solution Interviewer DB Solution Interviewer DSA Solution Interviewer OOAD/SE/SRE Solution Interviewer OTHERS Solution Interviewer Coding Questions Solution Interviewer OS Interviewer

Given an integer array (unsorted, not unique) Find out the


pairs which would make 14 if added together And once
they are used they can not be used again Array=[1, 2, 7,
Atteq ur arraylist and Atteq ur 7, 13, 13]
Inheritance polymorphism Atteq ur Rehman Normalisation QA FYP Atteq ur Rehman Aamir Saleem Process vs thread
Rehman hashmap,treemap Rehman Now, 1 plus 13 would make 14 this is one pair
We can not use the first 1 again for the last 13 and we
can not use the 13 earlier we used
(i wrote the code with time complexity O(n^2)
He asked me to optimize it)
what will happen in Atteq ur how to find loop in singly Find middle element from single linked list by traversing How multi
Abstraction encapsulation Atteq ur Rehman Black box Testing Multi structured Atteq ur Rehman
3NF Rehman linkedlist only once threading works
unit testing and with Implementation of
some examples how multi threading (in
Structured programming and object How to fast querying implementation of array
Atteq ur Rehman did you implement it Aamir Saleem Algorithums Atteq ur Rehman 8 Queen Problem Aamir Saleem my case i had to
oriented programming in database list by using arrays
in your assignments, implement on my
projects fyp)
which algo is used to How
Write a function to remove duplicates and return array and
Object vs class Atteq ur Rehman Normalization ACID What is HashMap white box Testing sort a linear unsorted Selection sort Atteq ur Rehman majid aziz synchronisation
its complexity
array works
how to remove Advantages and dis-
Composition and Aggregation Atteq ur Rehman Binary Tree greybox testing Reverse a string What is starvation Aamir Saleem
transitive depencency advantages of Java
Critical section and
Oop ke jitne bhi concepts he unki kio its details (does it
time complexities and
zaroorat pari, sab kis kis problem ka index in dB load testing weekness and strengths an input array is given, you have to output an array contain the shared
implementations
solution dete hen containing the number(s) which has occured maximum resources only or it
times in the array has code also)
Inheritance kio aggregate kio
composition kio abstraction kio many to Find 2nd highest value design patterns and web app and web What is critical
alishan rao hussain raza
encapsulation kio polymorphism kio many relationship from array implementation services section
etc etc two airplanes a and b with the speed of 500 and 700km/h go from lhr to karachi and karachi to
How can we
Reverse a string which
What is design protect critical
access specifiers ka farq keys data structure used write Qasim raza platform independent hussain raza
pattern ,its types section write
pseudocode
in what situations link list and array and trees are used code of it
What type of
memories are
Oop ka code kia tha usme bugs Implementation of Difference between
Triggers Qasim raza generated in a hussain raza
btanay thay adapter KNN and KMEAN
program and what
Convert above problem into recursive occurrence of a char in a string can be found by which data structure optimally are their purpose
Primary key vs Unique Deadlock and
thread related questions Cluster Indexing
key sigalton pattern avoidance
remove transitive
copy constructor Static import Qasim raza
dependency Threads
Things required for
difference between cpp and java Having clause connection with db in Thread joining Qasim raza
java
Things to be handle
Exceptional handling joins Multi threading Qasim raza
during db interaction
difference between
Finally Aamir Saleem Muti threading Deadlocks Qasim raza
implementation of joins
Syncronization and how How to avoid
Garbage collection Aamir Saleem What is entity Qasim raza
it is achieved deadlocks
Draw erd for a library what is your solution
Type of memory during java Heap memory and
system where students and how do you think Threads why use? Qasim raza
programm execution stack memory
can issue books your solution would work
What would you do if
there are multiple copies
How to implement
multi threading Aamir Saleem of a same book how SDLC Qasim raza
threads
would you differentiate
in tables
Problems critical
find bugs in my code (inheritance and Queries to write wrt to
REST and SOAP Apis section race Qasim raza
access specifiers) the erd and situations
condition
Normal forms (generally
Stack vs heap SOLID principle
asked)
Indexing and why
(object created without new keyword
indexing (how memory
vs obj created with new keyword Aamir Saleem Black box
would be managed) is it
where will they be stored)
expensive... Why..
Given a function and some variables
where they are stored and how they Advantages and
stored (if you answer this may be a Aamir Saleem disadvantages of White box
follow-up question would be why they indexing
are stored like this)
In case of multilevel inheritance how
memory is managed in objects (if the
Aamir Saleem Threads alishan rao What is Agile
grandchild class's obj is created what
it would be holding in its memory)
Cookies and its cycle
Write db query : what is
how it travel from server
the result of select * Ans=200 Rows
Constructor calling order and why this to client explain ( from
from A,B where A has (cartesian alishan rao Qasim raza
happens explanation question like
10 rows and B has 20 Product)
how they are maintained
rows
and all )
2. How is http safe from
Where and having
Destructor calling order https / difference Qasim raza
clause difference
between these
In java how the garbage collector
worksautomatically (how it de- Stored procedures 3. MVC architecture Qasim raza
allocates )
4. Scenario: I am
clicking on view all
Which language supports multiple
student button now
inheritance and which does not (why
majid aziz explain what will be the Qasim raza
not, whats the solution, implement the
procedure to display that
solution)
on webpage (MVC
Joins and types architecture explain)
Func overloading vs overriding
Aamir Saleem Indexing and types majid aziz
(implement them)
Is a relationship vs has a relationship Unique vs primary key majid aziz your fyp? role in fyp? why this idea?
Write a query to get a
(aggregation vs composition) list of employees
majid aziz
implement the examples of each working in a given
department when software is opened what 3 types of memories are made
Db query to find second
Exception handling (implementation) Aamir Saleem Qasim raza
highest salary process vs thread
Oop alishan rao Db schema and keys related questions Qasim raza diff b/w mac ad IP
Pillars with real life (map on
alishan rao
yourself)example upcasting and downcasting
Composition and aggregation alishan rao types of relationships in db diff b/w http and https
Write a class Room and it's sub
alishan rao
classes many to many rel and its example.
What is OOP hussain raza mongodb vs mysql (where would you use which one?)
Pillers of OOP and their benefits hussain raza Normalisation
How to avoid implementation of a
hussain raza
abstract function Disadvantages od Normalisation
What are threads hussain raza make a table in non normalised form
How to make threads in java hussain raza how to remove many to many
What is exception handling write code
hussain raza
of it left join
What is indexing and its
hussain raza
disadvantages Draw many to many relation simple ERD
What is array,list, binary tree,stack hussain raza
Diamond problem and solution
Polymorphism ,types and how it work
Null pointer
Memory leak
.obj vs .exe Aamir Saleem
composition vs inheritance Aamir Saleem
Diamond problem's Solution in java Aamir Saleem
features of Java Aamir Saleem
Polymorphism Majid aziz
Polymorphism implementation Majid aziz
Polymorphism example using class
Majid aziz
diagram
What method make classes to show
Majid aziz
different behaviour in polymorphism
Function overloading in details Majid aziz
REST vs SOAP API's alishan rao
Is a/ has a Qasim raza
Inheritance and abstraction Qasim raza
Late and early binding Qasim raza
Pillars of oop Qasim raza
8. Difference between abstraction and
Qasim raza
encapsulation how to implement
9. Coupling and cohesion Qasim raza
10. Inheritance code given you have
Qasim raza
to tell the output
11. Constructor chaining Qasim raza
12. Why order of constructor calling is
Qasim raza
like this
13. Create a car class and define
access specifier why private and
public

calling sequence of constructors


final keyword
Cpp is not platform specific
What is platform specific
what is JVM,JRD
Pass by reference and pass by value
Copy constructor object is passed by value or reference why ?
where is copy constructor called implicitly
can we make constructor private how will we make object of such class
static variable and method

RIZWAN TARIQ
Husnain Raza
SHEIKH
i2c 1st technical
Java VS C++
interview
Why people adopt java and why java
Oop
is better
JVM and other java related terms Pillars with example
Abstract classes code
Preprocessor directives
scenario based
macro Threads
what happen if we include two same
Multithreading
header in main
Overloading Synchronisation
Overriding Garbage Collecter
Interface Tryst catch in detail
Virtual vs Pure Virtual Exception handling
Vtable and Vptr Final block
Process vs thread Why final? scenario
Memory Division and how many
Memory segments are available and Indexing
their name
What advantages and
what does #ifndefine and #define in
disadvantages of
header file
Indexing
Linked List VS Array Write db query
Groupby having where
Code to find a cycle in linked list
clause
Code to find second highest in array Thread pool
Code to find count of each character
String pool
in string
Indexing Binary trees
Indexing disadvantages Hashmap
Normalization Interviewer husnain raza
Normalization Disadvantages
Copy Constructor
shallow and deep copy
Pass by value vs Pass by reference
Why object is receive as a reference
to copy constructor

Interviewer
*Asma Ilyas
Aamir Saleem
only* at *i2c*
for *SQA*

Sari degree ki cheezen puch lien


mujh se, interview asan tha, but it was Introduce yourself?
lengthy:
starting from OOP: inhertance
example aur code, aggregation vs
composition, constructor call,
diamond problem, polymorphism ki
What is your fyp?
example aur phir override aur
overloading kidhr kese ho gi (he
mixed some parameters tou just be
prepared for that)
Algo: dynamic programming ki
Your role in fyp?
use/need
Java theory: garbage collection,
why do your want to
JVM , JRE, JDK, and how it's platform
persue career in SQA?
independent
DB: Normal forms, ER diagram, ER
schema (tables wala), SQL query with Your CGPA?
joins
OS: multithreading, critical section Have you studied SQA?
SDA: design patterns (singleton and
*SQA Questions*
factory)
Difference between
Distributed computing: thori boht
Quality assurance and
theory thi basic si
Quality Control?
Problem Solving: Chess men queen ki
movement pe code likhwaya tha (he
What is AGILE?
was checking ke saray edge cases
handle ho rahe ya nahi)
What is SCRUM?
Usually sprint kitny arse
ka hota hai?
Difference between web
server and web
services?
Difference between
functional specification
document and
requirement
specification document?
Role of QA Engineer in
requirement gathering
process?
What is bug severity and
Imran Alam Gilani bug priority?
Give me an example of
a bug with high severity
and low priority?
Write two test cases for
WalikumSalam
LED?
How would you test LED
Starts with DB of your FYP.
non functionally?
Difference between
Ask you to create its ERD functional and non
functional testing?
Write a query on it What is adhoc testing?
Explain composition and aggregation What is grey box
with code. testing?
(Do check the concept of inner Who does grey box
classes for composition) testing?
Static *Database*
Const What is views?
Types of inheritance What is Primary Key?
What is composite
Benefits
primary key?
Write queries according
Strings
to the given scenarios
UPDATE DELETE
String vs string builder INSERT JOINS ye
queries ayin theen.
Memory areas of java *Analytical Questions*
Cut cake into 8 pieces
Stack vs heap
with 3 cuts
Identify a coin with less
Thread vs process weight from the given 7
coins.

Pro tip: he will try to confuse you alot


but if you know the answer then stick
with it
Q1: shape is a parent class square and circle are child classes
Shape *sh=new Circle() ;
Is it valid statement? And explain why?

Q2: what is Singleton design pattern and how do we implement it?

Q3: Explain Observer design pattern

Q4: what is denormalization and what are its advantages?

Q5: A customer paid a bill by checkingout on website. He is your website customer. And the status of payment become paid. T

Q6 write a query to display product name and category name where product ID is 1. Tables name are Product, Category and P

Q7: Design database of university its primary keys foreign keys of student, teachers and courses and also write usecases

Q8: print 2dimensional array of NxN size using one loop and one variable

Q9: Given an array of five positive integers. Calculate the mininum and maximum sum of 4 out of 5 integers. Calculate this in m

Q10: replace a digit in a number without using string or character typecasting


Example input=replace(423567,6,0)
Output=423507
of payment become paid. There is no difficulty in the process. How to maintain data Integrity.

are Product, Category and Product Category

nd also write usecases

integers. Calculate this in minimum time complexity


Here interview starts
Usny apna introduction krwya
Mery sy pocha study last semester chl rha
Kon kon sy courses hn
Elective courses ap chose krty ho ya university
Es py 4 5 discussion hoe
Phr FYP usny CV sy dekh k pocha ye kya hy
Es mn aesi kya features hn
Ye tu already bny hwy
Us py koe 5 6 discussion ki btaya uska sara
Phr MERN stack mn kiun kya
Us ka btaya
Phr ap kya kr rhy fyp mn role
Usk bad wo oop py agya
Inheritance kya hota
Code krdo eska
Usk bad composition
Uska code
Phr kehta room bnana hy eski classes btao
Wo btaya code kro esko
Wo kya
Kehta room mn furniture rakhna hy uski class ka code
Wo kya
Room mn 4 chairs rakhni hn usko kesy maintain krein gy, kya 4 objects bnayen gy furniture class k...
Uska btaya usko mny
Usko bad is a has a relationship kya hota
Uski koe example or btao
Java or cpp mn kya difference hy
JDK kya hy, JRE kya hy, JVM kya hy
Cpp mn multiple inheritance hy java mn kiun nai
Phr usny diagram bna k di kehta output kya hogi es case mn.. Wo constructor calling order wala scene tha
Wo btaya
Kehta aesa kiun
Phr wo btaya
Phr overloading or override kya hy
Code krdo
Us mn usny 3 4 different scenarios bna dye kehta ab btao konsa function call hoga
Kiun hoga
Phr pass by value kya hy pass by reference kya hy
Shallow copy kya hy deep copy kya hy
Code kr k do
Phr us py 2 scenario bna k dye kehta ab kya hoga shallow copy ya deep copy
Phr exception handling kya hota
Code kr k do
Phr process or thread kya hn
Us py scenario dya k agr mn 10 threads bnaon or 1 core system py chlata hun tu kya faida hy
Bnana chaye aesy ya nai ye pocha
Phr critical section problem kya hy
kya solution hy,
Critical section mn hm sirf shared resources ko secure krty hn ya instructions ko secure krty hn ye poch usny
Phr threads ko synchronized kesy krty hn java mn
Usk bad 8 queens wali problem di usny wo solve kro
Mny pehly for loop. Or nested for loop sy kr k dya
Kehta 1 loop mn kro
Phr DB py agya
1st normally kya hy
2nd kya hy
3rd kya hy
Transaction kya hy
Wo account sy paisy deduct ho gye hn 2sry mn abi add nai hwy.. Kya hoga es case mn
Usk bad usny 1 lmba chora scenario dya uska DB design krdo
Wo kya mny us mn kery nikaly
Wo thk hy
Or kery nikaly phr usny
Phr btaya k esko yun kr skty hn phr hm
: Us mn sy phr kery nikaly us ny
Phr query likhwai usi mn sy 1
Wo kr di
Phr kehta apka keo question
Mny 1 2 chezain pochein
The end
The interview was 3 hours long in my case.
Q1) Using singly linked list, you are on a node and you have to delete it but you don't have the address of prev node, How wou
Q2) Recode parenthesis mismatch program, so that it will take half of the time compared to the given example.
FYP related Questions
Inner join, left outer join queries
normalization in database
run/space time complexity of merge, insertion
static binding vs dynamic binding
you delete that node?
1st inteview: solution interviewer
Inheritance,and types
Prime number code
Anagram without sorting

Fyp stack discussion


Overlook scope?same or different
Stack and queur real timr example
Can we make stack with queue or queue with stack .
Multiple and multilevel inheritance
Pass by reference and value

Contiguous memory
Very generic oop questions
Basic DSA

Coding problems:
Find if string 2 is an anagram of string 1 or not.
Find median in array
Find the longest substring of a given string such that
the substring does not have any repeating
characters.
Oop basics concepts:
Explain public , protected and private inheritance?
We have a class company and another class school.
So both of these classes have same method.
In this case, is overriding possible or not?
Dsa basics:
Find if the linked list is circular or not ( just
explanation
Binary search tree ( properties of BST)
What are states?
What does useState() and useEffect() hooks do?
What is Event loop?

Is Nodejs single threaded or multithreaded?


How node handles multiple requests?

Strings Anagram
String Palindrome
Longest non repeating substring (no code just logic)
What is opp
Class vs Object
Encapsulation Example
Abstraction
Inheritance and types
Overloading and Overriding
Abstract Class vs Interface Class
Define DSA
Linear vs Non Linear DS
Stack and Queue
How to implement stack
Binary Tree
Binary Search Tree
Event Loop
Linked List
How to check given input list is circular linked list
(no code just logic)
2nd interview: solution interviewer
Print diagonals of 3*3 matrix
Linkedlist reverse
2 3 10 1 4 ,find leader
A leader is number , whose next all elements
are less than it.forexample here is 10 and 4
are leaders
Hosting in js
UseEffect, state props
FYP (where you will deploy it)etc
Print a Matrix in Spiral
Flip a matrix horizontaly and verticaly (mirror)
Given an array and a window size w, find w
consecutive elements with minimum repetitive
chracters

Print a Matrix in Spiral


Flip a matrix horizontaly and verticaly (mirror)
Given an array and a window size w, find w
consecutive elements with minimum repetitive
chracters

Find if the number is palindrome or not.

2)Print stairs of n by n matrix in O(n).


Input=
[[1,2,3,4],

[5,6,7,8],
[9,10,11,12],
[13,14,15,16]]
Output= 1,5,6,10,11,15

3) Given an array of size n and N integer k .


You need to find the subarray of size k whose
difference between the min and max is
minimum.
Input= [1,3,6,15,4,7,9,13,2] ,k=3
Output= 2
For sub array [1,2,3] max=3 min=1
difference=2 which is minimum among
all the subarrays.
OOP Solution Interviewer
Interviewe
Sql query to find names of
DB
emplyees of a specific
Solution r DSA Solution
department Bubble sort program
Interviewe OOAD/ Interviewe
r SE/SRE Solution r OTHERS Solution
2 basic analytical quetion
Interviewe Interviewe
r Coding Questions
Program to swap to swap to variable
Solution r
without using third variable
Program to ellaboate interhirance
Program to ellaboate overloadind
and overridding
Program for pallindrome
Program to reverser array
Program to implement queue using
array
Program to store objects of a class in
array and then find that object whose
type = "product" and have lowest
price value
SDLC (phases and models)
design pattern and singleton design pattern
pillers of OOP
2nd highest salary in the database
query optimization
Design patterns (Waterfall model, protyping, spiral model)
ANALYTICAL: There are three buttons in a room, you have to tell that which button turned on the LIGHT in room. you c
interfaces, abstract class, interfaces vs abstract class
Database: one to may relationship
how to resolve many to many relationship
normalization 1st - 3rd form
writing queries, aggregate functions, having clause, group by
SDLC, waterfall model, prototyping model
object oriented design
UML, has a relationship, is a relationship, aggregation vs containership

primary, foreign, composite keys ma difference with example.


Joins and it's types as well

PF(pointer, swap and other common interview questions)


DB (index's there advantages and disadvantages, diff b/w trigger and stored procedure)
OOP concepts(polymorphism along with code examples, overriding overloading
OOP: FINAL keyword, FINALLY KEYWORD
OOP: what to write in class so that it cant be inherited
DIFFERENCE between ABSTRACT CLASS and INTERFACE
SQL: WHY INDEXING IS USED? benfit of indexing
SQL: at which column index should be applied?
Reverse string
n the LIGHT in room. you can only enter the room once.
porbability
stats
dsa
analytical reasoning questions
level order bfs, dfs ,etc
queue bfs (use anyother ds instead of queue)
stack zoombie vs orphan process
joins getHeight of binary tree (iteratively)
limit - db Indexing
fyp inorder traversal
stored procedure ? why? efficient n^m in logm m can be negative
bst vs avl avl rotation hashmaps
binary tree vs avl sync vs assync
hashmaps left outter join
mapping selection sort algo principles
hashing cluster vs secondary index
largest salary query -> sort, limit

Analytical Riddle: Torch and bridge https://www.geeksforgeeks.org/puzzle-18-torch-and-bridge/


If A got 75% of total votes. Total votes are 560,000. 15% of the votes were invalid, so how mu
Probability: If there are cards from 1 to 20. and a card at random is drawn, what is the possibility that the c
OOP Find power of a number in logN and O(n)
DSA Find Nth last node of a linkedlist
Tree printing from level 1 to next level, breadth wise
DB Department with 0 employees
Manager with hihest number of employees

assesment Test Qs
A candidate got 75% of validated votes. If the 15% are invalid votes and the total votes are 560000. Then find out the count of t
The sum of the ages of 5 children is 50 and the gap between their ages is 3 years then find out the age of the youngest child.
Person A takes
n=4, m=-3 1 minute to crossWrite
 0.0156Version-I: the bridge, Person
a program withBtime
takes 2 minutesO(n).
complexity to cross the bridge, Person C takes 5 minutes to cross
Variation-II: Write a program with time complexity O(logn)
From a the
Return given
Nthtree,
nodestart
fromandtheend
lastlevel
fromprint out the nodes
a LinkedList using in level order
a single loop.from left to right in the given start and end levels.
void func(LinkedList
Tables: *list, int n);
Employee, Department
Write a query to get the manager’s name with the highest employee and if 2 managers have the same number of employees th
Write a query to get the department with zero employees count.

SOLUTION:
FROM dep
WHERE dNo NOT IN (SELECT dNo FROM emp GROUP BY dNo HAVING COUNT(*) > 0);

Recusive functions se two question


Heigh of a binary tree
Reverse string without moving special charaters
Math percentage question
Age of a person A B C, is type ka tha easy sa
Analytical question regarding sandtimer
What is mutex
Db query to find salary dept wise
Sand puzzle
Height of bst iterative and recursive both
Reverse string without effecting special character
Mutex Ans(An orphan process is formed when it's parent dies while the process continues to execute
Zombie process while zombie process is a process which has terminated but it's entry is there in the system)
Binary representation of given number
Find 4rth max salary
Select employees with no salary

Sand puzzle one empty in 7 minutes 2nd in 11 minute measure 15 minute

assesment Test Qs

O clouds assessment test questions:


1. If the cost of a chip is $43 after 20% discount what was the actual cost?
2. You have 5L jug and 3L jug and plenty of water. No measuring scale. You have to exactly fill 4L water.
3. Write a recursive function that will iterate until an input number's length gets 1
4. Program to find nth last node of a linked list
5. Reverse a linked list
6. Find the point where two singly linked lists intersected
7. Program to find in order traversal result on tree using iterative and recursive function
8. What is deadlock
9. What are threads
10. SQL query to fetch names of employees who don't have any salary in the salary table
11. SQL query to fetch names of the department where greater number of employees work. If a department have same name n

assesment Test Qs
1. A man has sell 40% of apples and he still has 420 apples left what is the total no of apples?
2. If 30 person do a work in 24 days then how many persons will be needed to do the work in 20 days
3.function to find reverse of number( you can't convert number into string)
4. 4 bottles of milk one is poisonous strategy to find one( geeks for geeks rat poisonous bottles problem)
5. Count leaf nodes ( iterative as well as recursive)
6. Reverse singly linked list by using extra space and not using extra space
7. Find count prime numbers from 1 -100
8. Socket?
9. Zombie process
10. 2 queries from given salary employee and department tables
1. Find department name who and no employees
2. Find the manager name with greatest no of employees and if 2 manager have same the print first with alphabetical orde

Calculate the sum of given


number and sum must be
single digit e.g.if number is
342567 then sum is
3+4+2+5+6+7=27 as sum not
single digit, then 2+7=9
Find middle node of link list
in O(n)
Count the length of linked list
Print in order travel of given
tree
Difference between public &
protected Inheritance
Transaction dependency
How we limit to create not
more than 10 objects
Difference between binary
tree & binary search tree
Factory Pattern Real life
example
Façade pattern
Difference between factory
& abstract factory pattern
purpose of abstract class
D/W overloading &
overidding
Given table, apply query
Question about FYP
Why we use indexing?
Type of inheritance
What is mutex and zombie
process?
Program to find the height of the
binary tree through recurrsion
and iterative method
Program to reverse the string
while the special characters
holds the position For example:
Input ab@k,w output wk@b,a
Find loop in linklist and remove
it
Covert decimal number to
binary
Find the third highest salary
(database question)

If cost of a prod after 42%


discount is 24$ finds its real cost
Return if a no is even odd
without any if...ternary or
comparison operation
jug prob find 4 liter water with
3,5 liter jug
String 123456.Write a prog that
gives sum in single digit using
recursion
2 link list are merged at a point
forming Y.find where are they
merging.(available on geeks for
geeks)
Inorder traversal using
1.recurssion 2.iteration
Given a no n find the nth last
node of link list (you have to it in
single loop in O(n)) there can be
many loops but you can use
only one in this example
What are threads
What is deadlock
find dept having More no of
employees
give employees with no salaries
(from two different tables salary
and employee)

Print binary search tree in level


order

implement stack using two


queue no limit in time
complexity but space complexity
must be O(1). In this question
you are asked to implement
pop,push,peek/top methods
you have two sand boxes one
can measure 11 minutes and
one can measure 7 minutes.
You are required to measure 15
minutes using these two
How to implement abstraction
and polymorphisam . Some
basic oops questions
1-n-1 numbers in an array ... 1 number missing and 1 repetition - return 1 array of size 2 that te

10 bottles - 1 pill per bottle of weight 1 gram - one pill expires and have the weight of 1.1 gram .

2 sand timers .... 7 and 11 .. measure 15

reverse string but don't special characters

nth highest salary views

stored procedure - syntax triggers

query vs stored procedure how to check if a query is slow


focused on db

zle-18-torch-and-bridge/
es were invalid, so how much of the total were valid votes that were casted to A https://www.toppr.com/ask/en-pk/question/in-an-election-ca
is the possibility that the card is a multiple of 3 and 5

Then find out the count of the validated votes the candidate gets.
ge of the youngest child.
C takes 5 minutes to cross the bridge, Person D takes 8 minutes to cross the bridge, and 2 people can cross the bridge at a time and they h

tart and end levels.

e number of employees then return the first comes in alphabetically of their names.
ocess continues to execute,
ry is there in the system)

artment have same name number of employees then print names in alphabetical order

with alphabetical orde


turn 1 array of size 2 that tells the repetitve and missing number

ave the weight of 1.1 gram .. tell the pill in one measurement.

k/question/in-an-election-candidate-a-got-75-of-the-total-valid-votes-if-15-of/

bridge at a time and they have only one torch to see the way. what will be the minimum time to cross all the people across the bridge?
ople across the bridge?
1st interview by interviewer: Wariz 1st interview
Fyp ka poucha
# Given that courses are organized by prerequisites in the following array:
Phir FYP ma apka role
prereq_courses = [ OOP pouchi
["Software Design", "Algorithms"], Encapsulation or abstraction ma differe
["Foundations of Computer Science", "Operating Systems"], Multi level inheritance or multiple ma d
["Computer Networks", "Computer Architecture"], Why we use DSA
["Computer Architecture", "Software Design"], DSA ma arrays linked list ma differenc
["Algorithms", "Foundations of Computer Science"],
Aik scenario dyga usmy apny btana ko
["Data Structures", "Comput1er Networks"]
] Linked list ka aik functionality btani hog
Linked list ma how to detect a loop
# Question: find the first course Phir arrays ka aik sawal poucha ky 2nd
# Output: 'Data Structures' Or aik question tha ky 1 array ma triple
Is ky ilawa hashmap Sets... Internal wo
NOTE: Interviwer har question ka optim

Question: list all courses in order


# Output:
# 'Data Structures',
# 'Computer Networks',
# 'Computer Architecture',
# 'Software Design',
# 'Algorithms',
# 'Foundations of Computer Science',
# 'Operating Systems'

Or aik erd bnwai thi ... Theoretical kuch b ni pucha


Basic OOP questions
Normalize a database, make ERD
Array based problem solving question
Analytical question
About FYP and your role
Prefered technologies to work
What do you know about company
First Technical interview PakWheels
General discussion about fyp and languages you've worked with
-theoretical
- abstract Classes
- Abstraction & encapsulation
- overloading & overwriting
- Exception Handling(Try Catch). Asked about finally block
- SQL and noSQL databases, difference bw them
- Name some Data Structures
- Create Possible Tables for a book store
-Coding
- Reverse a linklist
- Mid of a linklist
- valid parentheses problem
-Analytical
- Rope Puzzle(One Rope take 1 hr to burn, Burn 2 of them in exactly 45 mints)
- Water Bucket Puzzle(having 5 and 3 litter buckets with unlimited water, measure 4 litter)
-Design Patterns
- Strategy
by interviewer: Wariz

FYP ma apka role

apsulation or abstraction ma difference


i level inheritance or multiple ma difference
y we use DSA
A ma arrays linked list ma difference
scenario dyga usmy apny btana konsa DSA best ha or kiu
ed list ka aik functionality btani hogi, code ni krwaya usny bs btana hoga
ed list ma how to detect a loop
arrays ka aik sawal poucha ky 2nd largest ya 3rd largest btana ha array of numbers sy
aik question tha ky 1 array ma triplets ka product maximum ho woh return krwana ha Single loop sy
y ilawa hashmap Sets... Internal working of hasmaps and sets + Their time complexities
TE: Interviwer har question ka optimized solution mang rha tha in terms of time complexity

2ND TECHNICAL INTERVIEW


FYP in detail

Abstract classes vs interfaces in detail

Polymorphism, encapsulation. Why use them?

Design patterns Kon se parhe and implement kiay Hain? Unme se koi pouch lete

A DB schema of parking lot and query on that schema

2sum
First unique number in array

Maximum sum subarray

Linkedlist middle node in one iteration

Given character sequence like "s>p","p>a", "a>I", "I>n" create the given word
Instructions
1. Test time: 1 hour (Starting from the time of your booking (not the time of your
joining the room).
2. Join the meeting room with your correct name, otherwise we won’t know who
you are.
3. You should use Javascript only. If you face any IDE issues, you can simply use
the browser's console in dev tools.
4. Share your “full screen”. Not just a tab or application but “full desktop”.
5. Do not turn off screen share at any point.
6. You can use vscode or IDE for code hinting. You are not allowed to use google
or any other search engine or external source.
7. Your screen will be recorded. If you do anything contrary, you may get
disqualified.
8. You do not need to submit the answers anywhere. We will observe the
recording of your screen to assess.
9. You can leave the meeting room once you have completed the test. The
interviewer may auto exit/part you if time is over. Do not be surprised.
10. You are not supposed to ask any questions from the interviewer about test. If
some is unclear, you should figure it out. If something is incorrect in the question,
you can report it to the whatsapp number you got the invitation from.
Questions
1. 60 - Algo - 25 -
Given an input parameter of a string, find characters that are not repeated more than
2 times, extract them in the same sequence and return if they are pelendrom. Return
“notfound” if not.
a. E.g
i. input : “abaacbfcb” here ‘a’ and ‘b’ are repeated more than 2 times. So
we will ignore them. However, ‘c’ ‘f’ ‘c’ are not repeated more than 2
times. We will extract them in the sequence and order of the string as
“cfc” because it is also a palindrome. So you should return “cfc” as a
string.
ii. input parameter string: “psxxxszzzpz”. Here “pssp” is the correct answer.
b. Tests: Write a function named penTwoTimes(s);
Print it in console.log(penTowTimes(s)) for each of the bellow.
i. If s is “abaacbfcb” - the printed value should be “cfc”
ii. If s is “aaaaaaaa” - the printed value should be “notfound”
iii. If s is “psxxyyyyyxszzzpzyyyy” - the printed value should be “pssp”
I.e do this
console.log(penTowTimes(“abaacbfc
console.log(penTowTimes(“aaaaaaaa”))
console.log(penTowTimes(“psxxyyyyyxszzzpzyyyy”))
c. Constraints:
i. There is only one palindrome in the string provided. You should not seek
for more than one. Get / use the first one you find.
ii. If a character repeats more than 2 times, it should be ignored (like it never
existed in the string).
2. 50 - Algo - 20 -
Write a program that finds and returns missing numbers in an array. There can be any
amount of numbers in any sequence in the array.
a. EXAMPLES - [1,6,3,5,2]. Here [4] is missing. [2,5] here 3 and 4 are missing so
the expected returned array should be [3,4].
b. EXPECTED RESULT: return: array of missing numbers e.g [4] or [2,5]
c. NOTES AND PROVISIONS
i. You can change the input and match the expected output for only these
but your function should be able to handle any input array of any length,
any numbers, and any gaps between numbers in that array of numbers.
ii. It will not have negative numbers.
d. CONSTRAINTS.
i. The returned array should be in ascending order. E.g [3,4,7,9]. Not
[3,5,2,1].
ii. The function name should NOT be changed, else the question will go
wrong. : const myFunction = () => { return [1,2,3] }
e. Tests: test (input, expected output)
Make a function named missing(arr) and print these 5 lines below.
i. test( [1,6,3,5,2] , [4] )
console.log(missing([1,6,3,5,2])) should print [4]
ii. test( [1,7,3,5,2] , [4, 6] )
console.log(missing([1,7,3,5,2] )) should print [4, 6]
iii. test( [2,5] , [3,4] )
console.log(missing([2,5] )) should print [3,4]
iv. test( [5,2] , [3,4] )
console.log(missing([5,2])) should print [3,4]
v. test( [99999997, 99999999] , [99999998] )
console.log(missing([99999997, 99999999]) should print [99999998]
3. 40 - Algo - 20 -
Given an array of undetermined length, find the largest sum possible for any 3
consecutive numbers.
a. E.g:
i. [2,0,1,100,200,10,7,2,300,2,10] here 100,200,10 = 310 is the correct
answer. Here only the combination of these 3 numbers produces the
largest sum.
ii. [2,1,0,20,7] = 0+20+7 = 27 is the answer that you should return.
b. Assumptions:
i. There will always be at least 3 numbers in an array.
c. Constraints:
i. Return a number. Not an array or string. Otherwise your answer may
result to be incorrect
d. Tests: Make a function named largestConsec(arr) and print the 2 lines below
i. [2,0,1,110,200,10,7,2,300,2,10] = 320
console.log(largestConsec([2,0,1,110,200,10,7,2,300,2,10])) should print
320
ii. [2,1,0,20,8] = 28
console.log(largestConsec([2,1,0,20,8] )) should print 28
Intervie
OOP Interviewer DB wer

Interface ki implementation Diamond


problem ko solve krny k liy Self join ki query

Abstraction or encapsulation m diff 2 3 queries thein


Indexing or uski types detail m Join ki types. Normalization

Abstract class vs interfaces Group by kb use krty hn


Overriding overloading Having or where m diff

Is a/has a relation Unique vs primary key


Dangling pointers, memory leak Foreign key duplicate ho skti ya ni

How to retrieve second highest salary


Why OOP? Indexing
4 pillars of OOP Normalization
How do we achieve encapsulation and abstraction? Joins
How do we achieve inheritance?
Can we make an object of abstract class?
Abstract class vs interface
Overloading vs overriding
Static vs dynamic binding
Polymorphism types
Diamond problem and its solution
association
Aggregation
Composition

Qbatch 2nd interview CEO questions


Intro
Phir aap nay jin questions kay jawab first interview main ghalat diyay thay wo sab dubara poochay ga
Phir aapke FYP project kay bare main discussion hogi aur ussi main say questions

Indexing ki hoti hai kyun use hoti hai


Aik scenario tha Student aur Courses kay table bananay thay to beech main bridge table banana tha
Why choose Qbatch
Why Qbatch should hire you
Goal in 5 years
Goal in life
Goal in long-term career
Expected salary
Intervi
DSA Interviewer OOAD/SE/SRE ewer

Array or linkedlist m searching ki time complexity, Agr koi random value search krni hai

Tree m srf aik root node h .. ye BST hai ya ni


Data structures ki definition

BST ki characteristics

definition of data structures


Types
Difference between linear and non linear data structures
Array vs linkedlist
Graph vs tree
Pre vs post order traversals
Can graph have cycles
How to make a queue without using stack
How to get value of third last element of Linkedlist
ubara poochay ga

table banana tha


Interviewe Interviewe
OTHERS r Coding Questions r WEB

Array ka size 10 hai 11th


index pr value kese insert
Restful api hogi Cookies session
Authentication vs
authorization Or cookies client side pr locally kahan s
Put patch post m diff Swap two numbers without using third variable
What's your FYP? Your
role in your FYP? 1) Get put post delete
2) Can we do all these with the same fu
You have 8 balls, 7 of
same weight and 1 is
lighter. You have a weight
balancing machine too.
Find the lighter one in 3
attempts and
then in 2 attempts.
REACT
1) States
2) Components
3) Types of states
4) How to submit a form in REACT (sen
kies session

ookies client side pr locally kahan store hoti hn

Get put post delete


an we do all these with the same function? (Yes, patch)

omponents
ypes of states
ow to submit a form in REACT (send data from form to database??)
Link list vs array
Phr program to find middle of link list
Agr even nodes ho to konse node middle hogi Odd me konsi
Phr db questions
Indexing query thee bht basic se
Then analytical question ik

Interface ki implementation Diamond problem ko solve krny k liy


Abstraction or encapsulation m diff
Indexing or uski types detail m
Abstract class vs interfaces
Restful api
Authentication vs authorization
Array ka size 10 hai 11th index pr value kese insert hogi
Array or linkedlist m searching ki time complexity, Agr koi random value search krni hai
Tree m srf aik root node h .. ye BST hai ya ni
Self join ki query
2 3 queries thein
Put patch post m diff
Data structures ki definition
BST ki characteristics
Overriding overloading
Join ki types. Normalization
Cookies session
Or cookies client side pr locally kahan store hoti hn
Is a/has a relation
Dangling pointers, memory leak
Group by kb use krty hn
Having or where m diff
Unique vs primary key
Foreign key duplicate ho skti ya ni
Link
OOAD/SE/
OOP Solution Interviewer DB Solution Interviewer DSA Solution Interviewer SRE
Create a UML
Class Diagram
for a Hospital
that manages
patients,
appointments
and treatment
plans
Coding
Solution Interviewer OTHERS Solution Interviewer Questions Solution Interviewer

https://leetcode.com/problems/integer-to-roman/

https://leetcode.com/problems/balanced-binary-tree/

https://cppsecrets.com/users/149371151041141171161059599
OOP Solution Interviewer

First interview short hota h 15-20 min ka, second interview long hota hai... 1st interview me OOP and memory mana

What is the main technical difference between


c++ and python
How is memory management different in c++
and python

Destructors in python
Which operation of OOP is not valid in python

Mutable and Immutable data types in python


Which languages are Static and which are
dynamic .
difference between static and dynamic
C++ is a compile time language and python is
an interpreting language. Explain it

If you are an undergraduate they will briefly


test you subject wise
Starting from OOP to Operating System,
Computer Networks and DB.

Oop pillars first interview


Destructors q use krtay first interview
Memory kitni type ki hoti first interview
Kia pointers ka size same hota first interview
64-bit and 32bit system main kia difference hota first interview

ML/AI Python Developer


Count Sort ka Question
Do teen sawal he yaad hain boht pehle diya tha Reverse an Integer
Supervised Learning without converting it into a
Curse of dimensionality string
Naives Bayes Remove duplicate from a
Python simple code python list in O(n)
Mostly objective he tha Array indexing ka
Difference between RNN and CNN tough mcq aya tha
Linear Regression (Random Forest)
ML engineer ma yaad hai Array indexing example
Inn concepts se mostly mcqs the output of a[0] - 4[a] +
ROC Curve (4+2)[a]
Language models konsy achay like Bert lstm etc Is terha ka objective
SQA Written Test Topics
Topics :

api testing, db, oop, dsa, basic analytical


questions, IQ questions, sdlc, STLC, bug lifecycle,
testing kai concepts, black box, white box,
regression testing, sql queries, joins
CN Solution Interviewer OS

e OOP and memory management.. Second main zayada memory management kay questions thay aur OS aur DSA ki 2 proble
What is kernel and its
TCP and UDP in Computer functionality in Operating
networks system

What is DNS How RAM processes

Have you seen segmentation


If you type google.com what actually happens behine it how it works? error?
OSI Model
Can you tell the worrking of
every layer
What is protocol

TCP vs UDP first interview


Networking layers first interview

Stack overflow ka error q ata h first interview


Kernal kia krta h first interview
Solution Interviewer OTHERS Solution Interviewer Coding Solution

aur OS aur DSA ki 2 problems thi


Interviewer
If you are in a desert, create a UML diagram
1ST INTERVIEW (NON-Technical)
it was more of a discussion rather than just a
OOP
(showing the four pillars of OOP) of whatever
question/answer session.. you see.
explain fyp idea Difference between abstract class and interface?
your interests --> you have to explain it, so be
honest about it.. Can we create member variables in interfaces?

do you like maths? ya bs guzara chal rha ha? -> I


was asked to randomly multiply 2 numbers in mind Can we define methods in abstract class?

are you aware of current affairs? What is Abstraction?


If a parent class has protected member
variables and a child class inherits it and
then another class inherits the child
class, so can the grandchild class will be
do you know reason behind ukraine russia able to access the grandparent
conflicts? memebers?
do you know why is pindi temperature less than
murree?
what is this room's volume? Object vs class
where did you heard about ssi? (it was also a
discussion..) Abstract vs interface

your questions? Polymorphism in detail incl overloading, overriding concepts


Tell me about your schooling, Intermediate, marks. Inheritance vs composition (diff in relation bw classes in both)
Why did you choose Computer Science? Why PUCIT? How
H will you explain OOP to someone new to programming?
-Where
Do youdohave
you see yourselfinincurrent
an interest the coming 2-3Do
affairs? years.
you know about Russia Ukraine conflict
- In which Backend Programming language you have worked?

Probability Question:
- What is the probability of winning the toss if the captain chooses Head?
- What is the probability of winning two consecutive tosses?
Introduce yourself. What are your interests?
Favorite subjects? Why Computer Science?
Discussion on FYP.

What are Centripetal Force and Centrifugal Force?

Speed and acceleration?

There was a cubord, he asked, what shape is it. What is its volume and surface area.
You have a bag that has 8 balls, There are x balls
- What is the probability that the first ball drawn out
of it is a white ball?
- What is the probability that the first ball drawn out
of it is a white ball and the second ball is a black
ball and vice versa?
Name 3 countries of Europe.
Blockchain, Cryptocurrency, and Cloud Computing.
Programming languages you have worked with.
Introduce yourself from matric to bs
What are your favorite subjects, and why favorite
How many continents are? and list the name of all the contients
Velocity vs acceleration
Explain your fyp and your role
Light year
How much time sun light reach to earth?
Blockchain
Name 3 countries of Euorpe?

What are your favorite tech stack you work up till now? What tech stacks you will choose to work on the job?
There is employee table with following fields, id,
name, designation, deptNo. There are some
duplicates in table. You need to display the
duplicate records if name, designation and deptNo
repeat with any other record.
If you roll a dice, what is the probability you got 6.
If you roll two dice, what is the probability that 1 dice is 6 and other is odd at same time.
Russia and Ukarine Conflict
Solution Interviewer DB Solution
Map many to many relations without a junction table?
nd interface? What are stored procedures?

interfaces? What are the benefits of stored procedures?

What are triggers?

Difference between stored procedures and triggers?

What is sequence?

What is 3rd Normal Form?


Disadvantages of Normalizaton?

What is indexing and why we use indexing?

ing, overriding concepts Can we create an index on primary key?


elation bw classes in both) Disadvantages of indexing?
ne new to programming? What is referential integrity?
What is cascade?

BCNF
Indexing
When is indexing suitable, vs when not?
find no of employees having salary
greater than 5000
find no of employees having: salary
greater than 5000 and having same
name
find most recent salary of employees
(they have salaries updating..)
What is normalization? and state 3 rule of normalization?
SQL vs No SQL

to work on the job?


Interviewe Interviewe
r DSA Solution r
What is DFS and BFS?
Applications of DFS and BFS?

Difference between Hashmap and TreeMap?

Pseudocode of finding center node from a linked list? (in a single loop)

Pseudocode of removing duplicates from a linked list?

Difference between implementing an adjacency list with a vector of vector and a vector of the list?

Pseudocode to detect a cycle in a graph?

Best sorting algo in worst case? -> time complexity?


Explain quick sort algo
Explain BFS algo
Explain DFS algo
BFS vs DFS

LinkedList vs array
Hash vs array
Worst case insertion in Hash vs array
Interviewe
OOAD/SE/SRE Solution r OTHERS
What is defer?
What are promises?

Can we create a synchronous function using promises?

single loop) How to find out the datatype of a variable?


If a variable is intialized as a
string in global scope and then
assigned a int value in a method
and then a bool value in a
method is this a valid operations
in JS?

vector of vector and a vector of the list? Tell me about yourself, your interests (technical and generally)
Tell me about your FYP, What's your role and role of other team
Recommendation: Critically analyze your FYP before the intervie
What are blockchain, cryptocurrency, and cloud computing

How do we measure the volume of the cylinder? What is the surf


You have a rotating disc, and above
the disk there is a sensor. Disc is such
that it's have side has patterns, rest
are plain. When sensor sense
patterned region of disk, it displays 1
on screen and sense plain region, it
displays 0. You have to find if the disk
moving is clockwise or anticlockwise.
In which region Russia falls?
Name five countries in Europe.
Semaphores in OS
Why sky is blue?
How many ballons would fit in this
room, if given the volume of it and
room. Note: placing balloons onto top
of each other left some space, how
would you manage that in your
calculations.
what is GDP
Who is the President of Pakistan, and the Finance minister.
Interviewe Interviewe
Solution r Coding Questions Solution r

ous function using promises? Find min and max of array


find largest difference in an
array (can be from left to right
OR right to left) eg in this array,
maxDifference = 9 ->10-1=9
e of a variable? array: 2, 9, 6, 3, 5, 10, 1

find largest difference in an


array only from left to right

r interests (technical and generally)


hat's your role and role of other team members.
y analyze your FYP before the interview and prepare for the common questions that can be asked regarding your FYP
ocurrency, and cloud computing

olume of the cylinder? What is the surface area of the cylinder, What is a cuboid?

kistan, and the Finance minister.


Tajir Test Link

OOP Solution

5 mcqs thy 2 coding questions thy or asan thy wo like do arrays ko


merge krna tha ascending order mey

*Tajir Interview*

Introduction
Fyp discussion and your contribution in the project. A couple of
questions on that.
How did you know about tajir?
What do you know about us?
Future plans
Why you prefer tajir
Flask questions
What are routers
Endpoints
Postgresql advantages
What are docker images
Interviewe
Interviewer DB Solution r DSA Solution
Design
Database of
Tajir App
Design All
pages of Tajir
App (not UI but
backend)
How Data will
be sent to
Server through
HTTP
Requests
How Data will
be recieved
from Servers
Interviewe OOAD/ Interviewe Interviewe
r SE/SRE Solution r OTHERS Solution r
How did you
get to know
Tajir?

You role in
your FYP.

Your
weaknesses.

Design Tajir
App.
Interviewe
Coding Questions Solution r
// Write a function to multiply
two matrices together

// 1. First matrix must be m x


n and the second matrix is n
xk

// For example, first one is 2


x 3 and second one is 3 x 3

// Result will always be m x k


// 2. At least one row of either
matrix has be to negative
numbers

https://leetcode.com/problems/game-of-life/
Return the sum of duplicate
number and missing number
from an unsorted list of
integers from 1 to len(array)
i.e. [1,2,2,4] will return 2 + 3
=5
Count the non-palindromic
letter in a string e.g. abba = 0
abcdba = 2

Third question was this one https://leetcode.com/problems/jump-game/


FOR MERN STACK

1st interview

Simple database questions like left join inner and outer join 1st Technical interview for MERN STACK:
Dsa Kai Kuch questions the like searching, binary tree hashing OOP Basic concepts.
Is kai elawa fyp ka Thora bohat poocha tha Give an example from your experience where y
Koi sai 2 design patterns jo use kie hon Kisi bhe project Mia DB basic concepts.
What is Indexing?
Mujy ab srf itna he yd hai What should we use indexing and when we don
MongoDb vs Mysql Which one is better in your
2nd interview:
DSA:
Hr Kasi sath tha interview
Family mai kn kn hai 1) You have an array and millions of numbers in
Next study krni hai ya nhi. 2) Now instead of array you have a linked list.
Apny ap ko kidhr dekhty hoo future mai 3) does doubly linked list makes any difference?
Expected salary wagera
JS:
Is trh Kai questions the bs some basic concepts like
difference between let,var,const?
Then they offered me 110k Hoisting?
Clousure?
Asynchronous functions?
Callbacks?
If we have callbacks then why promisses?
Async await?

NodeJS:
What is NodeJs?
Main advantages of node over any other framew
For what kind of tasks node is best and for wha
As you said node is single threaded then how it

React:
What are hooks?
Hooks you used in fyp?
why React?
What is JSX?
Main Features of React?
UseState hook?
UseEffect hook?
What are sideEffects?
What are props?
If we have props then why context api ?
What is redux?

Express:
Features of Express?
Request life cycle?
Middlewares?
ew for MERN STACK:

om your experience where you have used conposition and inheritence in any of your project.

e indexing and when we dont?


Which one is better in your opinion and why?

y and millions of numbers in that array. Give an efficient algo to find a specific number in that array.
rray you have a linked list.
d list makes any difference?

let,var,const?

s then why promisses?

node over any other framework?


ks node is best and for what kind of tasks we should not use node?
single threaded then how it is non-blocking?

en why context api ?


Question
Write a sql query to find third maximum salary
Write a sql query to display frequency of values of a column having frequency greater than 1
Write code for factorial using iterative and recursive approach
Binary search
Which sorting algorithm is best and why
What is agregation and composition
What is function overloading
how many type of joins give name
What is left and right outer join
What is transitive dependency
fyp stack discussion
surrogate key
bst insertion removal complexity
what is suurogate key
Intended Solution Interviewer
ncy greater than 1
OOP Solution Interviewer DB
Fyp discussion
Diff between framework and library
What is git
What is git hub
Basic commands in git and cloning
What is alternative of git
What does -m in commit Command mean
Diff between stack and array
Diff between final and const
Access modifier
How to access a private attribute of class
What is multilevel inheritance
Should multilevel inheritance be preferred
What is encapsulation
What is abstraction give real life example
What is polymorphism give example
How to insert data into table
Remove a row from table
What is CRUD
Diff between Dbms and rdbms
What is sql
Extension of nosql
What format data is stored in no sql
Write a program, You are given an integer, return true if that
integer ispalindrome and false otherwise.
OOAD/SE/
Solution Interviewer DSA Solution Interviewer SRE Solution
Coding
Interviewer OTHERS Solution Interviewer Questions Solution Interviewer
OOP Solution Interviewer

4 sections

1. SQL/RDB questions (5)


2. Logical reasoning question (1)
3. Programming / Coding (1)
4. OOP concepts questions (3)
DB Solution Interviewer DSA Solution
OOAD/SE/
Interviewer SRE Solution Interviewer OTHERS Solution
Coding
Interviewer Questions Solution Interviewer
OOP Solution Interviewer DB
ABOUT COMPANY ------> SDM, k sth interview
hota hay 1 to 1 wo apko thora but, company achi
bht help bhi nahi hay kuch (as per
krdete hain my perspective)
bahir se ghr hay,
andar office

Test is divided into three sections:


SQA test, 1 analytical test, 1 personality test
There were many questions in the SQA test including things like:
- test instagram app, If you were to add a new feature in ABC app, what would you add.... , - Scenario based questi

What ara transaction


What is OOP in database

What are ACID


What is polymorphishm properties
joins in db, left right,
show sample using
Explain Method overloading and some dummy tables
Overriding with code example and data

How to delete a
Explain Inheritance with code examle column from sql table
Why we use inheritance in method remove a single row
overridding from sql table.
delete the whole
Inheritance in oop. table from sql.
Difference between
inner join and outer
Real life example of abstraction. join.

What is composition in oop. Indexing in Sql.

Dynamic polymorphism vs static What is equivalent of


polymorphism. Table in MongoDB
when to use SQL and
when to use
code of dynamic polymorphism Mongodb.
what is ES6, JS vs Jquery Indexing in DB
valid and invalid
Dom element queries in mcqs
query to show names
of active female
employees earning
block level elements more than 20k

department with
highes sum of
salaries wrt employee
java script m elements kin kin treeqo s table and department
get kar sakty table using join
Nosql and Sql
characteristics in
association MCQs

aggregation
department. Write a
query that counts the
number of employees
or baki k sawal jo 2022 wali interview in each department. If
guide me likhe hain wo a department has no
Many MCQS Regarding Oop, topics as employee then its
follows count should be
polymorphism shown 0.
cohesion, coupling, association,
inheritance and its types, A database query is slow. What could be the
possible ways of creating objects in
inheritance Indexing

binding Clustered Indexing

generalization Normalization
error finding How to map many to many in database
Cohesion (code example)
Coupling (code example)
Pillars of OOP
Through how many ways classes can be related in OOP
Aggregation (example in real life + code implementation )
Composition (example in real life + code implementation )
Association (example in real life + code implementation )
Polymorphism (example in real life + code implementation )
Then he asked the difference between
inline and block elements
JavaScript k koi b functions puche
Short intro hua and then he asked about
the frameworks I'm familiar with.
What is oop
Why oop
Pillars of oop (real life example with
implementation)
Disadvantages of inheritance.
Detailed discussion on polymorphism
Difference between composition and
association (example and
implementation)
What is Transaction?
Acid properties?

Design Patterns

Waterfall method

Disadvantages of Inheritance

overriding and overloading in oop.

Q1) What is Accessors, Mutators, Add Operator?


Ans) Getter, Setter , __add__(self,other)
Q2) What is Python Enhancement Proposal?
Ans) PEP 8 is a style guide for Python code, which provides recommendations for writing readable and
maintainable code
Here are a few examples of PEP 8
recommendations:
• Use four spaces for indentation.

• Use lowercase letters and underscores


for variable and function names.
• Limit lines to 79 characters.
• Put imports at the top of the file.
• Use whitespace to improve readability.
Q3) How can we measure the size of
project
Ans)
• Lines of code (LOC)
• Function points (FP)

• Use case points (UCP)


• Story points:
Q4) What is agile and xp?
Ans) Agile and XP (Extreme
Programming) are both software
development methodologies that aim to
deliver high-quality software in a flexible
and adaptive manner.
Agile is a methodology that emphasizes
collaboration, communication, and
frequent delivery of working
software. It values customer satisfaction
and focuses on delivering value in short
iterations. Agile
methods, such as Scrum, Kanban, and
Lean, often use visual boards, daily
stand-up meetings, and user
stories to prioritize work and keep the
team focused on delivering value.
XP, on the other hand, is a specific agile
methodology that focuses on delivering
high-quality software
through a set of best practices. XP
emphasizes test-driven development
(TDD), continuous integration
(CI), pair programming, and refactoring.

Q5) TCP / UDP


Ans)

TCP (Transmission Control Protocol) and


UDP (User Datagram Protocol) are two
protocols used in
computer networking to transmit data
between two devices over a network

TCP is a reliable, connection-oriented


protocol that provides error checking and
retransmission of lost
packets. TCP establishes a virtual circuit
between the sender and receiver before
transmitting data, and
it guarantees that all packets will be
delivered in the correct order and without
errors.
UDP, on the other hand, is a
connectionless, unreliable protocol that
provides no error checking or
retransmission of lost packets. UDP is
used for applications that require fast,
low-latency data delivery,
such as online gaming, streaming video,
and VoIP (Voice over IP).
TCP is a reliable, connection-oriented
protocol that ensures all data is delivered
correctly and in the right
order, while UDP is a faster,
connectionless, and less reliable protocol
that does not guarantee delivery
or ordering of packets. The choice
between TCP and UDP depends on the
specific requirements of the
application and the network environment.
Q6) How will you tell your Grand Mather
you are doing Software Engineering on
Phone call
provided she has no education and she
is using Nokia 3310 mobile?
Ans)
I would explain to my grandmother that I
am working with computers and
software, which are like
advanced versions of the calculators she
might be familiar with. I would tell her
that my job involves
creating programs and applications that
people can use on their phones and
computers, and that it
requires a lot of problem-solving and
creativity.
To explain it in a way that's relevant to
her Nokia 3310, I might say that my job
is to make sure that
people can use their phones to do all
kinds of things, like making calls, sending
messages, and even
playing games. I would tell her that I
work with other people who are experts
in different parts of phone

technology to make sure that everything


works together smoothly.
Q8) How can we implement the switch
structure of C++ in Python
Ans) Python doesn't have a built-in
switch statement like C++, but we can
implement similar
functionality using if and elif statements
or a dictionary-based approach. Use
Dict.

def switch_case(case):
cases = {1: "You chose case 1", 2: "You
chose case 2", 3: "You chose case 3" }

print(cases.get(case, "Invalid case"))


switch_case(3) # Output: "You chose
case 3"

Q7) MAC vs IP Address?


Ans) MAC address is a hardware-based
unique identifier assigned to a device's
network interface

controller by the manufacturer.


IP address is a software-based unique
identifier assigned to a device on a
network by the network
administrator or DHCP server.
MAC addresses operate at the data link
layer of the network stack for local
network communication,
while IP addresses operate at the
network layer for global network
communication.

Q8) Diff b/w graph and tree in 4 lines


Ans)
• A tree is a type of graph that has a
hierarchical structure with a single root
node and directed
edges that connect child nodes to parent
nodes.
• A graph, on the other hand, is a
collection of vertices (nodes) and edges
that connect pairs of
vertices, with no particular hierarchical
structure or constraints on the edges.
• Trees are used for hierarchical
structures such as file systems, family
trees, and organization
charts, while graphs are used for more
general relationships between objects,
such as social
networks, road networks, and computer
networks.
• Unlike a tree, a graph can have cycles,
multiple roots, and multiple paths
between nodes.
Q7) What is recursion and what we need
to make sure before implementing it
Ans) Recursion is a technique in which a
function calls itself one or more times to
solve a problem. A
function that uses recursion is called a
recursive function.
Before implementing recursion, it is
important to ensure the following:
1. Base case
2. Progress towards the base case
3. Memory usage
4. Time complexity
Q8) Stack Vs Link List?
Ans)
1. A stack is an abstract data type that
represents a last-in, first-out (LIFO)
collection of elements,
while a linked list is a data structure that
represents a sequence of elements.
2. Stacks are implemented using arrays
or linked lists, while linked lists are
implemented using
pointers to link elements together.
Q9) Array Vs Link List?
Ans)
Memory allocation: Arrays are allocated
as contiguous blocks of memory, while
linked lists use dynamic
memory allocation and are not
necessarily contiguous.
Size flexibility: Arrays have a fixed size,
while linked lists can grow or shrink
dynamically by adding or
removing nodes.
Access time: Array elements can be
accessed in constant time with an index,
while accessing an element
in a linked list requires traversing the list
from the beginning, resulting in a linear
access time in the
worst case.

Insertion and deletion: Insertion and


deletion operations in arrays can be
expensive, as shifting all the
elements is required. Linked lists, on the
other hand, can perform these
operations efficiently by simply
updating pointers.
Q10) What we need to do before merge
sort?
Ans)
• Before performing a merge sort, the
input list needs to be split into smaller
sublists. This is done
by recursively dividing the list into halves
until each sublist contains only one
element. This
process is called the "divide" step of the
merge sort algorithm.
• The "conquer" step of the merge sort
algorithm involves merging the sublists
back together in a
sorted order. To do this, we compare the
first element of each sublist and merge
them together
in a new list in ascending order until we
have one sorted list.
Q11) Pickling in Python
Ans) Pickling in Python is a process of
converting a Python object hierarchy into
a byte stream format
that can be stored on disk or transmitted
over the network. The process of pickling
is also known as
serialization or marshalling.
Q12) What are the functional and non-
functional requirements of a project give
some examples
Ans)
1. Functional requirements describe what
a software application or system must do
to satisfy its
users or stakeholders such as User
management, Data management,
Workflow management
and search
2. Non-functional requirements are the
criteria used to judge the operation of a
system or
software application such as usability,
reliability, performance, security, and
maintainability.
Q13) What is Triggered?
Ans) trigger is a special type of stored
procedure that is automatically executed
in response to certain
database events, such as data
modification, insertion, or deletion. The
trigger can be set to execute
either before or after the database event
occurs.

Q14) Primary vs Secondary


Ans) Primary key uniquely identifies each
record and is used as a reference by
foreign keys.
Secondary keys improve performance in
searching and sorting but are not
required to be unique.
Primary key enforces data integrity, while
secondary keys optimize database
operations.
Q151) Normalization?
Normalization is the process of
organizing data in a database to reduce
redundancy and
dependency, and to improve data
integrity. There are several normalization
types, including:
1. First Normal Form (1NF): Ensures that
each table cell contains atomic values
and there are
no repeating groups of data.
2. Second Normal Form (2NF):
Eliminates partial dependencies by
creating separate tables for
related data. Partial dependency occurs
when a non-key attribute depends on
only part of
the primary key, meaning that it is not
fully dependent on the primary key.
3. Third Normal Form (3NF): Eliminates
transitive dependencies by removing
non-key
attributes that depend on other non-key
attributes. Transitive dependency occurs
when a
non-key attribute depends on another
non-key attribute, rather than depending
directly on
the primary key.
4. Boyce-Codd Normal Form (BCNF):
Ensures that each determinant is a
candidate key,
eliminating redundancy and anomalies.
5. Fourth Normal Form (4NF): Addresses
multi-valued dependencies by creating
separate
tables for related data.
Q16) What is the most important stage of
waterfall model
Ans) Requirements Gathering and
Analysis stage is considered to be the
most important stage in the
model. This is because this stage sets
the foundation for the entire project and
ensures that all
stakeholders have a clear understanding
of the project scope, objectives, and
deliverables.

Q17) Filter in python?


Ans)
• numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
• even_numbers = list(filter(lambda x: x
% 2 == 0, numbers))
• def is_even(num):
return num % 2 == 0
• even_numbers = list(filter(is_even,
numbers))
Q) Diff b/w === and ==
Ans) So in summary, == checks for
equality after type coercion, while ===
checks for strict equality
without type coercion.
coercion, meaning that it will attempt to
convert one or both operands to a
common type before
checking for equality.
Q) Sql Queries Type?
Interviewe
Solution Interviewer DSA Solution r
mujhe offer ki, mene
zayada demand ki to
recently aik incident hua kahte email
jahan haseeb larke k karengein, and then
naam hay ushe dusre they went ghost
din hi nikaal diya mode

dd.... , - Scenario based questions,..... - Problem identification on the question paper

Stack VS Queue

Stack Vs Heap

what is enqueue and


dequeue.

what is push and pop.

stack and queues


e query is slow. What could be the reasons?

p many to many in database


Stack VS Queue

Stack Vs Heap

Waterfall model
vs agile model

html 5 newly
added tags ->
semantic markup
css class and id
vs inline styles

closure in
JavaScript
Hoisting in
javaScript

2 type of scopes
in JavasScript

CSS FlexBox

CSS em and rem


difference

How to make
website
responsive

block vs inline
elements in HTML

UseState in
React
UseEffect in
React with
dependency list
will run before
rendering the
first element on
screen or after
rending the
whole screen?

Redux ( Actions,
Reducers, Store)

What is CMMI.
How to delete a
column from sql
table

remove a single
row from sql
table.

delete the whole


table from sql.

Difference
between inner
join and outer
join.

Indexing in Sql.

Inheritance in
oop.

Real life
example of
abstraction.

What is
composition in
oop.

Dynamic
polymorphism vs
static
polymorphism.

How you will


describe AM / PM
to a 5 years old
child?

Difference
between state
and props in
React.
What is
equivalent of
Table in MongoDB

when to use SQL


and when to use
Mongodb.

overriding and
overloading in
oop.

what is enqueue
and dequeue.

what is push and


pop.
Interviewe
OOAD/SE/SRE Solution r OTHERS Solution

At first i was seated in a


waiting room where i was
provided a form that was
meant for personality
scrum analysis.

agile How to create table in html

Difference between span and


design patterns div

Explain code for generating a


password according to user
requirement, if user want an
application of design alphabet,digit and special
patterns based on character in password and
senarios also gives pssword length
Waterfall model vs agile
Design Patterns model
html 5 newly added tags ->
semantic markup

css class and id vs inline


styles

closure in JavaScript

Hoisting in javaScript

2 type of scopes in
JavasScript
CSS FlexBox

CSS em and rem difference


How to make website
responsive

block vs inline elements in


HTML

UseState in React
UseEffect in React with
dependency list
will uselayouteffect will run
before rendering the first
element on screen or after
rending the whole screen?
Redux ( Actions, Reducers,
Store)
What is CMMI.
How you will describe AM /
PM to a 5 years old child?
Difference between state and
props in React.
Basic JS and HTML tags
(syntax based mcqs)
2-3 basic Machine Learning
senario based Mcqs
Agile Development
SCRUM

Likhwaya TU Kuch Nahi Tha


Basic Questioning Hoyi Thi
Stack vs Queue
Array vs LinkList
HashTable

Stack Vs Heap
TECHNOSOFT 1st
INTERVIEW

1st interview me code ni


likhwaya koi

Rashid naam tha unka head


HR wo

easy interview tha

jo sheet me questions add hn


wohi puchy
kch new questions thy 2 3

fill factor in indexing


js me alert prompt or confirm
me difference
*DSA me bs basic pucha*

linear non linear

stack heap queue


analytical question puchy 2
cut a cake into 8 pieces with
with 3 cuts or second 6 balls
of same weight except

except one

and he was saying that k


second technical interview
will be more about problem
solving and data structures
Interviewe Interviewe
r Coding Questions Solution r

A pseudo code will be given and


you will need to mention errors
and solutions
a proper code will be given and
you'll be needed to point out
errors and give solution

a code to flip aray (left to right)


no pseudocode allowed
an ATM machine dispenses 50,
20 and 10 dollars notes and
max limit is 500, write a code to
print number of each note
required for the entered amount
and the total number of notes
should be least possible

1-Write a function which takes


the price of car and calculate the
price of the car in each coming
year.
- 40% price of car decreases in
the first year.
-20% devalue in rest of the
years
- Program returns the price
when the car is 9 years old or
cost becomes less than $1000

2- Suppose a 2D array which


represents an image and each
value of array 0(white) to
255(black) represents a pixel of
the image. If the value of any
pixel of image is 0 or 255, the
image is said to be Burn-out.
Write a function that takes that
Array By Reference and X%
change in the value of pixel.
TECHNOSOFT 2ND
INTERVIEW

Questions related to stacks you


mentioned on your resume
Pillars of oop or unka code
likhwate like aggregation,
compositions, dynamic
poluphomism ka code likhein
Write code for database
attaching to the backend in my
case backend was node.js
Query from many to many table
like fetch all the enrolled
courses of a student
What is transaction
What the consistency in ACID
do give a real life example
where Consistency property is
appying

How we can optimize a query?


Real life example of stack
How abstraction is different than
the funcutins as functions are
also abstracting information
Difference between abstract
classes and interfaces
What design patterns you know
What is the problem for which
builder design pattern was
created
Discussion about a problem and
it's solution the problem was you
are given a dictionary of words
and a string without spaces like
"thequickfox"
And dictionary of words:
["the","quick","fox"]
Then return a dictionary of
words that would be in that
string there can be multiple
answers, give one
TECHNOSOFT SECOND
INTERVIEW

yeh CEO k sath hota

if you are asking about ASE to


wo sab puchty ...like har cheez ko
thora thora touch krty hy
os, dsa(trees graphs) oop software
engineer

concepts bs
and the Ceo will ask you about a
skill that your are good at maybe a
technology used in FYP
and he will ask you to rate yourself
on a scale of 1 to 10 and aap ki
rating k hissab sy he will ask the
questions
aik scenario based ho ga koi
question and aik Iq sy related
OOP Interviewer DB we use database
why Interviewer
instead of files, benefits of
database, cost of database
- Polymorphism and vice versa.

- Runtime vs static linear vs non linear


polymorphism datastructures

how data stored in RAM,


- Why static classes stack OR Queue??
- difference bw static classes encapsulation vs
and functions abstraction...most important
- overloading vs overriding bridge entity alternative
must read normalizations
- private inheritance examples

- protected keyword

- overloading is static - why use databases and


polymorphism? not store data in files

- different types of
- final vs constant keywords databases
- can we run sql queries on
Overloading vs Overriding noSql databases
- what are DML/DDL
Dry run the given oop code keywords, separrate them
- what are different types of
Factory method keys

Shallow copy vs deep copy, write its code - what is normalization

Static Members - types of normalization

Singleton and Factory Pattern Along with code - why use foreigh keys

- where vs having clause

define classes for animals in a zoo. Joins

pillars of oop x 2 behavior of left outer join

Left outer join query on tables


Object vs class x 2 ACID properties

Design Schema for Food panda

Runtime and Compile time errors? Design Schema for Car booking app

Oop real-world example

Polymorphism real-world example Patient, Doctor, Appointment schema + SQL q


Draw class diagram for a restaurant What is table?

How many keys?

What is Primary key?

Normaliztion
Draw ERD for a restaurant
Write a query on above designed database
OOAD/
DSA Interviewer SE/SRE Interviewer

- Implement Queue using Stacks

- Trees, different types of trees

- Searching an element in BST

- Pre-order/post-order traversal
- what are graphs

- Difference bw tree and graph


- traversing graphs using BFS and
DFS

- What are different sorting algo


- Explain merge sort, what is its
time complexity, adn why is its
time complexity nlogn

- time complexity of BFS


- Given a node, delete it from
linked list
[1,2,3,4,5] ==> [120,60,40,30,24]
without using divide

Given a string, return a dictionary


containing number of instances of
each word

Validate whether two binary trees


are mirror of each other
Remove last Nth node in link list
(for that they made me design the
whole list class)

Check and remove cycle in link list

Dry run a recursive code

Which sorting algorithm costs less


if array is partially sorted?

Which sorting algorithm performs


minimum number of swaps?
check wether a string is
palindrome or not (asked 4
different methods)
given a array of strings find
longest common prefix
(["flower","flow","flight"] => "fl")

Implement undo redo functionality


Read CSV file with student details,
sort it by any column that user
specifies, and return ids

A linked list contains even and


odd numbers. Balance the linked
list by deleting node such that it
contains equal number of even
and odd numbers.
Given productivity on scale 1-100
of persons form a team such that
the difference between the sum of
collective productivity of teams
has minimum difference. Read
input from file and take team size
from user.
Find kth maximum element from
array. What is the time complexity
of the algorithm you presented?
Delete a node of a linked list but
you do not have the head pointer.
You only have the refernce of the
node that should be deleted.
Array vs Linked List

You are organizing the


tournament of n number of players
where each player skill set is
ranked between 1 and 100
(inclusive). Your goal is to create
teams of equal numbers of players
where the skill set of all players in
the single team should be an
arithmetic sequence with common
difference value being 1. For
example (2,3,4) is the valid team,
and (5,6,8) is not.
Consider a Singly Linked List, and
a pointer 'head' that points to the
first node of the linked list. You
need to provide the code to
perform the minimum number of
necessary deletions on the linked
list so that the end state of your
linked list is in ascending order or
descending order.
Find ith-last node in a linked list,
with 3 different methods (worst,
better, best)
Find if two Binary trees are mirror
of each other
Write insert function for BST
Find runtime and compile time
errors in a given code.
OTHERS Interviewer -Coding
Problem: Questions
Given an array, Interviewer
calculate and store (product of all
entries of array except ith index) at
- Introduction ith index
- Explain FYP, what is your role input: [1, 2, 3, 4, 5], the expected
and role of other members, what output would be [120, 60, 40, 30,
work have you done so far 24]
- do you have concepts of theory
of automata [answered: no,
otherwise they ask every fuckin
concept]
- what technical elective courses
have you studies so far

- what are different architectures


you are familiar with

- what is mvc architecture

- explain architecture being used


in your fyp

give 2 return 5 and vice versa

10 machines of gold

array vs heap

Introduce Yourself
Tell me about your FYP, your
role, your teammate's role, which
technology stack you choose
and why?
Confict while selecting
technology.
How did you selected the FYP
group? Is it just a group of
friends or any particular reason?
Is there any group member that
is irritating? How do you handle
him?
Is there any major conflict with
your teammates you have faced
during your FYP.
What are your weakness? Your
strengths?
If you are given a chance to
change one thing in Pakistan
then what will that be? What's
the solution you have?
Your Dream 5 companies, if
any? Are you too specific about
the company you want to join?
Any regrets you have regarding
your FYP? Is there anything in
your FYP that you want to
change if you are
taken back at the time of making
FYP group
Personalitites that inspired you
to do programming? Their name
and reason!
Where do you see yourself in the
future? Any goals you want to
accomplish?
Implement undo redo
functionality
WEB

- what languages you can code in

- which language has more grip


on memory

- what are threads


- what is asynchronous
programming
- why we use threads
- how many stackframes are
created for a process
- why there is stackoverflow
exception
- one stackframe is allocated to a
function of program or the
complete program

- what is an api

- types of api

- advantage of using api

- what is server caching

- what are caching policies


The questions are difficult to explain but I'll try my best.
Q1: Given an integer k and an array, split the array into two parts such that each part's sum equals to k otherwise return -1.
Given a 4x4 matrix
C stands for Charlie (dog)
F for Food
H for home
You need to compute minimum moves for Charlie such that it first eats all the food before going to home
For example [FOOF],[OCOOH],[OOOO],[FOOO]
Amswer is 11.
Q3; You need to compute maximum free time in between the given time slots.
For example
[(8:30AM-10:00AM),(10:30AM-12PM),(12PM-2:30PM)]
The maximum time slot is 30 minutes.
Objective
What does a garbage collection do in C#
Other mcqs were easy related to basic OOP concepts
Q4:
Given a string of integers, if two odd consecutive number exist add a * between them. If two even consecutive number exists ad
For example str="457764"
Output = 45*7*76/4
Final output = **/
to k otherwise return -1.

onsecutive number exists add a / sign.


Basic interview easy questions
easy DB questions
3 question problem solving
1 array say maximum find
1 longest sequence [1,2,3,4,0,1,2,3,4,5,6,7,8,9,1,2,3] is say longest find karny hongay sequence theek or
String say character a ki occurnce
Ye 3 sawla solve kar k team lead interview layta hay. Friendly reh k

Below Ques are asked in a single Interview


1.Detail fyp discussion
2.resume pe jo jo projects likhe thy unke bare me thora thora pocha
3. Phir jin languages ko parha hai usme se most comfortable kn si thy
OOP Q
Difference between INHERITANCE and POLYMORPHISM
dono me code re use ability hai how do they differ
Function overloading and overriding me difference
Difference between static bindings and dynamic binding

Phir aik Coding q tha


1,2,3,0,1,2,3,4,5,7,8,9
Longest subsequence ka code likh ke daina tha (PROPER CODE)

And then DB QUESTIONS


Difference between SQL and NO SQL
What is INDEXING
Why is it used
Advantage and disadvantages of INDEXING
difference between Stored procedures and TRIGGERS
say there is a social app and you have created a friendship function
How many tables will be created
What will be the columns
How will u fetch data using these colums
Say agar mene search karna hai ke kya A B ka friend hai ? Tu what query will i use.
Or same agar B ke end se search karna ke kya A uska friend hai tu tb kya query ho g
Or har friendship pe kitne record add hn g

1. Check if string is palindrom


2. Reverse a string
3. Find longest continuous subconsequence in an array of numbers
4. DB: find 2nd highest salary in a table

1 array say maximum find


1 longest sequence [1,2,3,4,0,1,2,3,4,5,6,7,8,9,1,2,3] is say longest find karny hongay sequence theek or
String say character a ki occurnce
Ye 3 sawla solve kar k team lead interview layta hay. Friendly reh k
1. Find the average of an array excluding the max and min of the array.
2. Find the index of last occurance of a target number from the given array.
3. SQL Query to get a row from table. (Exact yaad nhi he).
4. Swap the values of two variables without using 3rd variable.
https://leetcode.com/problems/word-search/
Question No. 1
Question No. 2
Question No. 3

7 Vals SQA Test


34 questions hotay total-!
Simple pf ka aik program ata or 4 SQL ki join ki queries or written questions hotay 8 or 9(jo k sqa k topics ki basic definitions ho

Interview
1. Introduce yourself
FYP Full idea, stack used etc
OOP :
Run time vs compile Time error
Aggregation vs Composition
Polymorphism
How to prevent a class from further inheritance
What is virtual Keyword
Overloading and overriding
If return type is changed is it still Overriding?
Can a child class points to its parent or a parent class points to its child e.g. A a = new B() or B b = new A() A is parent B is chil
What are static vairables
Can Static members call regular members
Database:
FYP schema
Query from fyp
Joins
Left outer join
Indexes
Stored Procedures
DSA
BST vs binary tree
Find distance between two nodes in bst
There are n sorted arrays find smallest common value

What is singleton Pattern? Write its code

2nd Interview
How you rate yourself in OOP
What is upcasting and downcasting
Parent p = new Child() this is upcasting or downcasting
Pillars of OOP
Encapsulation and write a code
What is polymorphism
Give Real life example of polymorphism
Overloading and overriding
If return type is change is the function still overloaded
If return type is change is the function still overridden

Then I mentioned about my competitve Programming interest


Which language you prefer?
why c++
what are vectors
is vector an arraylist?
difference between vector, array, linkedlist
What is your role in competitive programming

Then problem solving questions


Delete a node from linkedlist(only value) in O(1) time and only that node address is given no head no tail and this is singly linke
A nested list is given like [1,[1,2],4,[[1],[2]],[[[[3],4],5],6,7]] flat this list like 1,1,2,4,1,2,3,4,5,6,7
Given a BST perform any LL,LR,RR,RL operations and make it balance tree
given an array sorted make a bst which is balanced (use binary search algorithm)

What is indexing in database


benefits of indexing
searching algorithm used in indexing
any disadvantage of indexing
Given a case study doctor and patient exists, An appointment a doctor can have many patients and a patients can have many d
Write a query to display all doctors with 5 or more appointments
Display name and id of doctor who has no appointment
why subquery? write using joins
difference between join and subquery, which is fast
topics ki basic definitions hoti) baki mcqs hotay basic sqa concepts k. That's it..

new A() A is parent B is child

7Vals Secone Technical Interview:


Web:
Difference between POST and GET?
Why we don't use POST for all kinds of requests?
What is CSREF?
What is cross-origin?
What are the disadvantages of allowing cross-origin?

Database:
A company have millions of employee when they are updating all the employee's incremental s
There is a Customer table having the customer name and customer id and another table order
Also, write a query to find out the customers who didn’t place any orders yet. (Note: without usin
What is indexing and what are the disadvantages of indexing?

Problems:
P-1:
Given an integer array which has sub-integer arrays in it of depth N, write a function which retur
Input:
arr=[7, 3, 2, [22,[9, [0, 2], 3, 1], 4, 77], 45, [5], 0]
Output:
no tail and this is singly linkedlist ans=[7, 3, 2, 22, 9, 0, 2, 3, 1, 4, 77, 45, 5, 0]

P-2:
Given a 2D matrix returns the transpose of this matrix?

P-3:
Word-Search Probelm

P-4:
Given an AVL tree where nodes are unique and their values can repeat, map it to the DB schem
a patients can have many doctors
P-5:
There are 3 crates of fruits labelled first as mango, the second as apple and the last one as mix

Interviewers:
Abdul Basit
Maira Muneer
e employee's incremental salary from the company’s website the server respond with an error of connection timeout to the database, Now
id and another table order having the customer id as a foreign key and order id. Write a query to find out if the customers have an order co
rders yet. (Note: without using sub-query and joins)

, write a function which returns a flat array created from this array while maintaining the order of the integers in all arrays.

peat, map it to the DB schema. Write tables and define keys.

pple and the last one as mixed fruits. If all the labelled tags are wrong then what will be the minimum number of checks of fruits(picking fruit
meout to the database, Now company hire you as a DB analyst and assign you the task of resolving the issue, how you will solve the issue, e
customers have an order count of 5 or more.

checks of fruits(picking fruit from any crate) in order to find out the correct labels of all crates?
ow you will solve the issue, explain your solution?
OOP Solution Interviewer DB Solution
unique vs
primary key -
-compile time binding indexing

- diff b/w stack and heap

-diff b/w ArrayList and array


- when memory allocated on stack and
heap

-diff b/w abstract class and interface


- how would you do multiple inheritance in
C#

- What is redux in react?

- diff b/w angular and react

Pillars of OOP
Interviewer DSA Solution Interviewer OOAD/SE/SRE Solution
design pattern konsa
ata he (singleton ata
tha -> code likhwaya)

Modify singleton code


so that only 3
instances can be
created.

Architecture of FYP
Coding
Interviewer OTHERS Solution Interviewer Questions Solution
given a string
introduction remove
duplicates
Reverse an
-fyp(your role , integar.
blockchain konsi use Example:
kr rhy , iske alternative Input-> 567
kon konsy) Output-> 765
- what will be tha
angle b/w hands of
Arshad Majeed clock when it's 3:25

Libraries used in Fyp Arshad Majeed


Do you have any in
experience in Flutter? Arshad Majeed

Activity lifecycle? Arshad Majeed


What is Android
Gradle? Arshad Majeed
What is android
manifest file? Arshad Majeed
What are broadcast
receivers? Arshad Majeed

What are intents? Arshad Majeed

Types of intents? Arshad Majeed


Explain different types
of layouts in android? Arshad Majeed
Interviewer

Arshad Majeed
- Fyp discussion (why this, what do you hope to achieve, jo results atay usko evaluate kesay kro gy)

- agar apki cv pe unky related koi specific projects hyn to usko pora details me pochtat, meny time series forecasting with FB P

main part of interview


- run time pe 1 problem detay iska solution devise kero, kis trah kero gy.
Mujhy interviewer ne, streaming platform ka recommendation system bnany ko kaha, uspe main Qs thay
--> features selection or feature engineering
--> data preprocessing techniques
-- > recommendation approaches (the more the better, har 1 ka pros/cons bhi poch rahy thy)
--> evaluation metrics like precision recall
A) iskay related 1 specific Q tha, kis trah ki problems me precision behtar hoti or kab recall
series forecasting with FB Prophet ki thi usme detailed pocha.
+ Must go through the questions of each subject of interviewbit website. Majority of our questions are covered in their pdfs.

PS: this is not just a random Tukkka. I did my preparations using this way, gave interviews at 4 places, and got an offer from all
Alhamdulillah.

Bqi relax, have tawakal on Allah. InShaAllah Jo naseeb me likha hai wo mil k rhe ga or Jo jga ap k liea behtar hai wahi pe jana
at the end. Just keep doing tadbeer and then asking Duas. Jazak Allah.

You might also like