Interview Questions
Interview Questions
$
what is the difference in == and === in JavaScript
working of joins through venn diagram
center a div in such a way that it should remain responsive
count the occurrence of number in a array and sort the numbers in such a way that number with highest occurrence
Fyp stack questions: For react JS , can we update the prop in child component which is passed by parent compone
difference between Margin and padding
what is the difference in == and === in Javawhat is the difference in == and === in Jav
working of joins through venn diagram working of joins through venn diagram
center a div in such a way that it should re center a div in such a way that it should rem
ccurrence come first and so on count the occurrence of number in a array count the occurrence of number in a array
component Fyp stack questions: For react JS , can we Fyp stack questions: For react JS , can we
ence in == and === in JavaScript
hrough venn diagram
ch a way that it should remain responsive
nce of number in a array and sort the numbers in such a way that number with highest occurrence come first and so on
ons: For react JS , can we update the prop in child component which is passed by parent component
ome first and so on
Arbisoft 2022 Arbisoft 2022 Coding Test
Arbisoft 2023 Arbisoft 2023 Coding Test
DB OOAD OOP EAD DSA Common Sense
Normalization Design patterns Polymorphism Garbage Collector Find second maximum from the list. They said to change the function at runtime like without using any other varia How many times an hour hand overlaps with the minute hand of 12 hours clock? What if the hours are 24?
Many to many relationshipWrite code of singletInterface vs abstract class Is. NET provide built in functionality of garbage collection or we have to specifyTime
i complexity of the above function
Indexing How can we achieve polymorphism? Can we achieve multiple inheritance in. NET?
Primary key vs unique key How can we call abstract class method with base class pointwr? Why we can't achieve multiple inheritance in. NET?
What if we remove polymorphic function from derived class Why we need to make an interface?
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. y
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
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 Consider a row of n coins of values v1 . . . vn, where n is even. We play a game againstHow
an opponent by height
do you find alternating turns. In
of a binary eachx2
tree? turn, a player selects either the first or last coin from the row, removes it from the row permanently, and receives the value of the coin. Dete
Reverse
A string islast n nodes
given in linkparenthesis,
containing list valid or invalid, you have to return the max sum of consecutive valid Find the nth number in Fibonnaci Sequence. Find kth largest number in array, cost sould be less than O(kN)
braces Find the third highest node in BST using O(1) space and in O(n) time
Return the count of maximum nodes in a root to leaf path Delete the last occurence of an element from a linked list
Note: Ansectors will also include the node itself + the chain of parents of the nodes. Verify if a binary tree is BST or not? x2
Delete last occurrence of an item(number) from a singly linked list Follow Up: What if the duplicate nodes are present in the binary tree Remove nodes with duplicate values in a sorted link list
Find the2:"B",
{1:"A", count3:"C",
of distinct
4:"D",number of pairs
...., 26:"Z"}. in an Tests:
Sample array whose
For n=1product is equal
=> Output: to an=2
A, For number K. Note:B,(a,
=> Output: For b)n=26
== (b,=>
a) Find Duplicates in an array
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
Given atrees.
binary tree and a value n we have to check if sum of values from root to leaf nodes exist that matches
the given
Given valuewe
a string n 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
linkedthe
listnearest multiple
that is equal to to
thex sum
in theoftable of n. represented
numbers for example n=
by 4,
thex two
= 9, input
output = 8, handle
linked list. for negative
example:inputs as well
ll1 = 1->0->2,
ll2 = 2->1->5,
Write a function ll to be finds
that returnedout if=a3->1->7
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
There the
is an binary
2d arraytree (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 3 4 5 1 2
Find max value
consecutive evenin node
binarywhose
tree. 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",
number. Find the total{}:
sum"balanced,
of all the[]:numbers
"balanced", ab:"balanced"
represented in O(n)e.g.
by all paths. andAwithout
binary using stack
tree has queue three
following
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 element is less than it.
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
Red Team
Write a program in C toTechnical Interview
take input from user and #2
add 2
numbers
Are there any problems with this program
Explain integer overflows
Whichare
Why languages are vulnerable
integer overflows to integer
considered overflows?
a vulnerability.
Answer with examples
How would you mitigate this vulnerability in assembly?
How would you mitigate this vulnerability in C?
int result = x + y; Sample Answers
}
Yes, integer overflow
Integer overflow - Wikipedia
Mainly C, C++ and Assemblies
Give examples of array OOB, BoFs, underwrites etc.
Explain how you would deal with it
Write a sample C code and explain
Omlime Test: https://drive.google.com/file/d/1Y2zcNzq0UyTudCu1y5JUki8569ARgf8x/view?usp=share_link
w?usp=share_link
The first test was on triplebyte and had 2 main parts first test is identical for everyone as far as I know
General Coding Logic Test
I choose python and they tested various concepts of python like set properties, dictionary behaviours, even one question was from threading and sorting list of dicts
Coding Exercise Quiz
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/
Given an array of inetgers, display all subsets.(power set)
Find distance between two nodes of a binary tree.
Given two arrays num and index, sort both arrays according to the index array.
Java is not platform specific
Cpp is 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
when software is opened what 3 types of memories are made
process vs thread
two airplanes a and b with the speed of 500 and 700km/h go from lhr to karachi and karachi to lhr respectively at one point they are parallel at that point which one will be closer to lhr
in what situations link list and array and trees are used
occurrence of a char in a string can be found by which data structure optimally
Normalisation
Disadvantages od Normalisation
make a table in non normalised form
how to remove many to many
left join
Draw many to many relation simple ERD
sigalton pattern
diff b/w mac ad IP
upcasting and downcasting
diff b/w http and https
Print Negative and Positive Numbers in Array in alternative manner
Find Duplicate Elements in Array
Palindrome String
Print Stack in Reverse Order
Kth Maximum Element in Array
Technical Interview (Final)
Tell me
Tell me about
about your
yourself,
FYP,your interests
What's (technical
your role and roleand generally)
of other team members. Introduce
return: yourself
{1.5, and
2.5, 3.5, your FYP. Reason to chose the tech stack.
4.5};
Recommendation: Critically analyze your FYP before the interview and prepare for the common questions that can be asked regarding your FYP
What are blockchain, cryptocurrency, and cloud computing Write pseudo code of how will you write a software for Card game using principles and pillars of OOP
How do we measure the volume of the cylinder? What is the surface area of the cylinder, What is a cuboid? How will you sort an array in-place with least time complexity?
How will you explain OOP to someone new to programming? Difference between LinkedList and Arrays.
Tell me about your schooling, Intermediate, marks.
Why did you choose Computer Science? Why PUCIT? Have you ever regretted your decision of choosing computer science as a career?
-Where
Do youdohave
you an
see yourself
interest in the coming
in current affairs?2-3
Do years.
you know about Russia Ukraine conflict
-- What
In which Backend
is the Programming
probability of winninglanguage
the toss ifyou
thehave worked?
captain chooses Head? -FYP, Tech Stack
Polymorphism + its implementation
- What is the probability of winning two consecutive tosses? - class
- List vs struct who have not submitted their fine of July.
students
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 - List students
- Difference + sum
between of total
array andfine of July
linked list
clockwise or anticlockwise. - Write code
Identify whichtobutton
identify whether
turns the given
on which light. linked list is a circular linked list?
In which region Russia falls? You can only go in the room twice.
Name five countries in Europe.
Semaphores in OS
Why many
How sky is ballons
blue? 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.
GHAYOUR ALI
detailed discussion about FYP
1. Why did you choose these technologies
2. What research you have done
3. what challenges you faced
4. What is the accuracy
5. how will you deploy
Political questions like Russia Ukrain war
Analytical : there are 2 doors, one guard at each door. one door has treasure and other has zombies. How will you find the treasure?
What do you think about the ai boom
OOP
If you are in a desert, create a UML diagram (showing the four pillars of OOP) of whatever you see.
Difference between abstract class and interface?
Can we create member variables in interfaces?
Can we define methods in abstract class?
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 able to access the grandparent memebers?
DB
Map many to many relations without a junction table?
What are stored procedures?
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?
Can we create an index on primary key?
Disadvantages of indexing?
What is referential integrity?
What is cascade?
DSA
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?
JS
What is defer?
What are promises?
Can we create a synchronous function using promises?
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?
SE
What lifecycle method are you using in your fyp
How do you manage the scope of your project
OS
Where is metadeta for files is stored in FileSystem? If we have 100kb space in our disk and we want to store empty files on it. How many such empty files can we store?
e.g.if number is 342567 then sum is 3+4+2+5+6+7=27 as sum not done
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
D/W overloading & overidding
hreeSum Problem)
Reverse a singly list in O(N) time and O(1) space.