New Interview Preparation - Subject Wise
New Interview Preparation - Subject Wise
-Write a function which takes a number as parameter and print "test" if it is divisible by 3 , "QA" if divisible by 5 and "testQA" if d
-Write a function to return 2nd largest in an array.
What is OOP and why we use it
Abstraction
Polymorphism (in detail and depth)
Access Modifiers (all)
Keyword Static usage
5. Than he GAVE me a scenario and write the pseudo code.
[1,2,3,[4,5,6],7,8,9] how find max in it.
find maxsum and min sum of 4 elemnts in array of 5 elements.
Pillars of opp.
Overlaoding.overriding
Print first 10 prime numbers
-Write a function which returns true if the given number is prime number.
Swap two numbers without third varaible.
Arrange them(123456789)in 3*3 matrix so that rows ,columns, diagonal,sum will be 15.
If we inherit public and private what will happen?
Is private inheritance possible?
Write do while loop as a for loop.
Why oop? Advantages and disadvantages?
Code to print array backwards
Oop
Abstraction and encapsulation
Code for composition and aggregation
Diamond problem
And its solution
-- oop concept plus inheritance ka code likha tha usnay or uspe Q/A kia, types of inheritance
String is palindrome
Sum of digits using recursion
Diamond Problem
Inheritance and its (What
Types is it, How to solve)
multi-level and multiple
4 pilers of oop
inhe
string palindrome
[1,2,3,[5,6,7],7,8] make this 2D array in 1D using recursion
check number is prime or not
arrange negative numbers first and postive in last of array
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,
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 the valu
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 slices
(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. The sum of s
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
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
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 integ
[0..1,000]; each element of array A is an integer within the range [−1,000..1,000]. In your solution, focus on correctness. Code i
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
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 parts
spike (3, 5, 2) sequence (3, 5) is an increasing part and sequence (5, 2) is a decreasing part, and for spike (2) sequence (2) is b
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
find the longest spike as a sub-sequence of A, but rather choose some numbers from A and reorder them to create the longest
solution(A) which, given an array A of integers of length N, returns the length of the longest spike which can be created from the
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, 4, 1], yo
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 function should ret
create the following spike of length 4: (2, 3, 2, 1) and we cannot create any longer spike. Note that increasing and decreasing p
increasing/decreasing and they always intersect. Write an efficient algorithm for the following assumptions: N is an integer withi
each element of array A is an integer within the range [1..1,000,000].
Draw schema of a subsystem of FYP (scenario given)
Types of relationships in DB
Given a scenario, explain what relationship holds there (1-many etc)
What is normalization? and why do it?
2 NF
deadlock and its solutions (mutex v semaphore explain with example)
Is vs == in python
Pillars of Oop with Examples in terms of coding.
Explain the 4 pillers of OOP with a programmatic approach.
find missing number from given range
swap 2 number 3 solutions mangay usny
leetcode power of 2 problem
Given string s return the index counting from 0 of a character such that the oart of the string to the left of that chacter is a revers
to right. For example racecar will return 3*
find the index whose left most string and right most string are reversible. If not present return 0.
given a string of A's B's and C's, remove the occurance of AA, BB, CC. The program needs to run until all AA, BB CC gets rem
What is copy constructor?
Why we pass by reference and not by value in copy constructor?
Difference b/w inheritance and polymorphism?
What is encapsulation and abstraction?
Write a function that takes root in parameter and tell whether it is a valid binary search tree or not ?
Write a function that takes an array and a target in parameter and return the starting and ending index of the target.
Example : Array[1,2,3,4,4,4,4,5,6,7,8] , Target =4
Your function should return [3,6] as the starting index is 3 and ending index is 6.
The array was sorted you not to worry about that.
python mixins,
python decorators
explain inheritance with code example using constructors
Print 2D array in spiral
check if string is anagram
Total types of inheritance
abstraction vs encap
static - inheritence..
overloading vs overriding
string - common letters find
find second largest number in array
string is pallindrome or not
flatten a jaggaed array
recursion
what is happening here? what if I call Func A(1,1). which function will get called?
correct answer is upper Func A will get executed.
1- Func A(x):
x = x + 10
Func B(&x):
x = x + 15
driver code:
x = 10
FuncA(x)
print(x)
FuncB(&x)
print(x)
run time and compile time polymorphism,overloading and overriding,using virtual keyword what we achieve,run time or compile
what is oop. and what is class and instance.
Four pillars of oop, describe each
Purpose of virtual =0.
Abstract & Interface difference
Static variable and Static function
Diamand problem
Diamand problem. If java doesnot allow multiple inheritence, then how diamond problem arise
why do we use & in copy ctr paremeters list?
Given an integer array and an integer k, return the k most frequent elements. You may return the answer in any order.
input: array = [1,1,1,2,2,3], k = 2
output: [1,2]
input: array = [7,7,6,7,4,6,4,6,6], k = 3
output: [7,6]
You are given an array of integers. There is a sliding window of size k which is moving from the very left of the array to the very
k numbers in the window. Each time the sliding window moves right by one position. Your task is to return the maximum value i
Given a string containing characters and brackets ‘()‘,’{(3)}’. Determine if the input string is valid.
An input string is valid if:
Open brackets must be closed by the same type of brackets.
Open brackets must be closed in the correct order.
Every close bracket has a corresponding open bracket of the same type.
Precedence of brackets (,{, [ does not matter.
input: equation = “()”
output: true
input: equation = “{(2+3)}”
output: true
input: equation = “[{(1+3)^4}/2]”
output: true
input: equation = “[{(1+3)^4}/2)”
output: false
difference
What exactly between
This normal
Is Pattern and es6 function
=[1,2,3,11,55,6,77]
sub-pattern =[11,55,6]
Write function which take two arg and give index if sub pattern exist in pattern
Write function which take hours and minutes and return angle
Find even maximum sum of array
Find sum of non duplicated elements of a array
Aik question mein recursive code given tha ussay iterative karna tha.
Baki tha composition aur inheritance mein se konsa ise karna chahie
Write Code to convert binary into decimal.
Interface
Abstract class vs Interface.
Private vs protected
Sum of digits of a number untill single digit is left.
find the pair that has maximum sum in an array.
check two words anagram or not
find minimum difference between two numbers in unsorted array
string="pentaloop" find first non-repeating character
First least repeating character in string.
Question1: write a cpp or python code to check if a string is palindrome or not
Question2: Write a cpp or python code to check if a given number is Fibonacci or not
Also you have to mention time complexity
There were 2 questions for coding round
1) Find Second Largest and Second Smallest numbers from an array
2) Factorial of a number
Also write time complexities of both programs
2. String -> change 'K' letters in a string and find the maximum substring of the same letters from that string. matlab 1 string ma
characters change ker skty aur esi substring btani jo same letters sy mil ker bni ho.
1. Given two strings find they if are anagrams
Find the nth fibonacci
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 equa
145 is a strong number because 1!+4!+5!=145
Four pillars of oop
Max of a n array
Find which string in array of string is pallindrome
5. What is a friend function?
6. What are access modifiers?
7. Explain protected access modifiers?
8. Composition, aggregation
Coding questions like Multilevel Inhertiance is protected called in class E or accesiible in E or not?
A is abstract class inherited by B and B is inherited by C. B did not implement the function is this arise an error or not or is Clas
not. How errors resolved?
Overloading vs Overridng
Compile vs Runtime
oop basic questions
What are pillars of oop
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
OOP pillars in details
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
Heap memory allocation vs stack memory allocation
What is virtual table in OOP?
Can we overload a constructor and destructor?
anagram code
Aik probability k sawal th
Find the sum of numbers which are arithmetically correct
a function to calculate the square root of a number
a function which returns 3 if receives 4 and returns 4 if receives 3.
Q1: shape is a parent class square and circle are child classes
Shape *sh=new Circle() ;
Is it valid statement? And explain why?
Q4: what is denormalization and what are its advantages?
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
How to Prevent SQL Injection
Class
Parent class child class
Accessors, Mutators, Add Operator
PB-8 in Python
How can we implement the switch structure of C++ in Python
What is recursion and what we need to make sure before implementing it
Pickling in Python
Diff b/w encapsulation and abstraction
Diff b/w tuple and attribute
Filtering in Python
What is number and why do we use it
replace a digit in a number without using string or character typecasting
10. shape is a parent class square and circle are child classes
Shape *sh=new Circle(); Is it valid statement? And explain why?
5. Write a function that takes in an integer and returns the sum of its digits. The function should continue summing the digits un
obtained.
Example: Input: 9875 Output: 2 9 + 8 + 7 + 5 = 29 2+9=11, 1+1=2)
9. Check if a string is a palindrome? A string is a palindrome when it reads the same forward and backward.
Example:
Input: str = "112233445566778899000000998877665544332211";
Output: " Yes "
Input: : str ="123"
Output: "No"
1.Inheritance, polymorphism, encapsulation, abstractions ka baray ma pocha tha
2.Real life example of polymorphism
3.Types of polymorphism and their example
1.given list of string find the one with maximum size
2.given 2 strings find if they are anagrams
Aur phir oop ma access modifiers poche aur poocha agr 1 class ki privage members ko access krna ho to kese krte access
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
hongi....in classes ka apa mai relation kia hoga one to many etc...ar chat history maintain kase krenge hr day ki...
Slowest key press
Balance parenthesis
(hacker rank)
-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 a string "[(){}]" tell whether its a balanced brackets or not
Find Longest Palindromic subsequence or a sequence in a string
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)
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
equals itself e.g 371=3^3+7^3+1^3
Q3. Write a method toGenerate a random number without using any built in random generator method
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).
Abstract vs interface
Can abstract class extend single or multiple abstract classes?
Real world examples of objects, OOP and four pillars
Oop pillars with examples?
1) Interface vs abstract class with example
2) Polymorphism (example must be from the room you are currently sitting.)
3) Class, object, reference ma difference
6) BinaryEquivalent ka function
7) Palindrome (string must be of 5 char length)
And OOP all pillars and their examples.
Strings are mutable or immutable?
1) factorial of a number without using recurssion.
3) Create a class constructor which also initialize a variable name . No call that constructor from child class.
5) 2D array treversal using for each loop.
You are given an integer number e.g. 345 and a number k e.g. 12.
You have to make 345 999 starting from 3->9 4->9 5->9.
You have to subtract the difference from k. i.e. After 3->9 k=12-6 =6. After 4->9 k=12-5=1. After 5->6 k=0.
Second question was to remove duplicates from an array.
backtracking,recursion and 1d,2d dynamic programing.
Also for these you have to draw the recursion tree.
In my case the questions are Print largest subsequence palindrone?
Then then ask you to change it using oop.
In 2nd interview they ask Print all possible combinations of a string.
Game of fly problem of leetcode without using extra memory and also a class diagram related to any game scenario given.
static binding vs dynamic binding
Print diagonals of 3*3 matrix
Inheritance,and types
Prime number code
Anagram without sorting
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
Multiple and multilevel inheritance
Pass by reference and value
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
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.
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.
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?
Strings Anagram
Longest non repeating substring (no code just logic)
What is opp
Class vs Object
Encapsulation Example
Inheritance and types
Overloading and Overriding
Abstract Class vs Interface Class
interfaces, abstract class, interfaces vs abstract class
pillers of OOP
pointer, swap and other common interview questions
polymorphism along with code examples, overriding overloading
FINAL keyword, FINALLY KEYWORD
what to write in class so that it cant be inherited
DIFFERENCE between ABSTRACT CLASS and INTERFACE
Reverse string
Find sum of diagonal elements of matrix
Find strong number between two numbers
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
Overriding overloading
Is a/has a relation
Dangling pointers, memory leak
How do we achieve encapsulation and abstraction?
How do we achieve inheritance?
Can we make an object of abstract class?
Abstract class vs interface
Static vs dynamic binding
Polymorphism types
Diamond problem and its solution
Composition
- Explain Oop to an illiterate person.
- Inheritance and its Types
- Diamond problem and solution
- Overload vs Override
- Early and late binding
- polymorphism
- Abstraction and encapsulation
- Implementation of encapsulation
- Constructor and destructor
- Pointers and how they work
- Dangling pointers
- Memory Leaks
• Why we use oop?
• Difference between overloading and overwriting
• Inheritance
• Polymorphism
• Difference between static binding and dynamic binding
• what are static variables
• What are pointers, dangling pointer, memory leakage
Abstract aur interface me difference
Polymorphism thore se Bht zada detail me ni
Array ka size 10 hai 11th index pr value kese insert hogi
Destructors in python
Destructors q use krtay
difference between static and dynamic
Kia pointers ka size same hota
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 grandch
the grandparent memebers?
Polymorphism in detail incl overloading, overriding concepts
Inheritance vs composition (diff in relation bw classes in both)
How will you explain OOP to someone new to programming?
Data types, Oop, Why e use it what if we cant, Interfaces extreme concepts, types of inheritance, overloading, overriding
Problem:
input array={1,2,3,4}
Output array= {24,12,8,6}
Flask questions
After that a senior developer came and asked me to solve matrix multiplication problem. Then he gave me a leetcode question
number of jumps to reach the end). (1.5 hrs long).
-compile time binding
Coding Round:
Reverse an integar.
Input-> 567
Output-> 765
given a string remove duplicates
Reverse an integar.
Example:
Input-> 567
Output-> 765
Run time vs compile Time error
Aggregation vs Composition
How to prevent a class from further inheritance
What is virtual Keyword
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
What is upcasting and downcasting
Parent p = new Child() this is upcasting or downcasting
Encapsulation and write a code
What is polymorphism
Give Real life example of polymorphism
If return type is change is the function still overloaded
If return type is change is the function still overridden
class vs interface
abstract classes ( can we create objects of it?)
virtual and pure virtual
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.
4. Swap the values of two variables without using 3rd variable.
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
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
1,2,3,0,1,2,3,4,5,7,8,9
Longest subsequence ka code likh ke daina tha (PROPER CODE)
1. Check if string is palindrom
2. Reverse a string
3. Find longest continuous subconsequence in an array of numbers
4 pillars of oop?
Static variables?
Access modifiers?
aik problem di jis me aik element repeated tha...wo find krna tha
opp ke 4 pillars
Abstraction kiya
Encapsulation kiya
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.
What does a garbage collection do in C#
Other mcqs were easy related to basic OOP concepts
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 = **/
Interview was totally about OOP and it's importance over procedural programming.
One question about making object oriented approach for a game (chess) and then comparing it with procedural programming a
OOP of procedural programming.
-Why OOP?
-Real life example which can cover 4 pillars of oop.
encapsulation vs abstraction...most important
- Runtime vs static polymorphism
- Why static classes
- difference bw static classes and functions
- overloading vs overriding
- private inheritance
- protected keyword
- overloading is static polymorphism?
- final vs constant keywords
Dry run the given oop code
give 2 return 5 and vice versa
Shallow copy vs deep copy, write its code
Static Members
Object vs class x 2
pillars of oop x 2
define classes for animals in a zoo.
Runtime and Compile time errors?
Oop real-world example
Polymorphism real-world example
Draw class diagram for a restaurant
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
Why do we use oop?
pillars of oop?
what is array?
Which datatypes can be stored in Array?
Write a program to calculate the sum of elements in array.
Write a program, You are given an integer, return true if that integer ispalindrome and false otherwise.
Write code for factorial using iterative and recursive approach
What is agregation and composition
OOP Basic concepts.
Give an example from your experience where you have used conposition and inheritence in any of your project.
Reverse Function kya hoty hain?
Solutions
ll be called by compiler.
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 = {}
for i in range(size):
if A[i] in frequency:
frequency[A[i]] += 1
else:
frequency[A[i]] = 1
max_size = 1
return max_size
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 make
object of abstract class. in absctract we have to
minimum one method abstract but in interface we have
to abststact all methods.
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 method can be access out side class
without creating object of that class.Static methods in
C++ can be overloaded but they cannot be overridden.
https://aticleworld.com/dangling-pointer-and-memory-leak/#:~:text=Generally%2C%20daggling%20pointers%20arise%20when
questions
Diff between Array and Linked List?
Among LL and Array which one is best for
searching,deletion and insertion?
Diff between Tree and Graph?
Write code to Find missing number in sorted array
Find second higest salary
Db mey tables sy related queries poch rhy thy or agli id ksy aaye gi
kya likhy gaye hm khud likh skty hain primary key sary concepts
pochy
3rd highest salary likhwa ky run ki error ka pocha
15. Indexing in db
16. Normalization.
When denormalization is required?
When normalization is enough?
What are advantages of using Sql over NoSql.
Some queries, they gave a senario and asked to write a query
against it.
outter joins
ER Diagram Database
SQL/NoSql difference
Write four types of keys and explain them
crud queries
normalization
What are the keys in DBMS?
- Transitive Dependency
indexing,where we apply it on row or column and on which bases.
ACID
Views
What is transaction
Find 3rd highest salary
Using given table, find the count of employees each manager is
handling
Triggers vs Procedures
diff between drop, truncate, delete
how to implement manay to many relationship
indexs and its drawbacks
how to apply constraints
draw association(ERD) between entities of given scenario
bridge entity
4th max salary? why did you use distinct in query? any other way
to find 4th max?
why indexing? make an index? which column do you prefer for
indexing?
join vs subquery
Join query on 3 tables
Right outer join using left outer join.
define indexing? table has million of record with index? does
indexing helpful in that
cluster or non cluster index
write query to return 2nd last record of table
4 maximum salary
Walmart
find maximum salary for each department
can we replace right join with left join
3rd me sql ki aik condition btai thi student courses relationship
Uski table diagram bnaye..
Or join wali aik query likhuwai thi just
ERD of department and teachers
And a query related to it
3rd max salary
3rd highest salary
count of employees in a department
Avg salary
Query to find distinct cities from table employee and department
database me 3 table dia user,orders and payment
query likhni thi jis ma btana tha wo user la ao jino na aik order kia
>20000 or os order k lia sirf aik hi payment hui ha
- find query for nth max salary from employee table
Basic db mcq
Db ki query thi aik table employees wala tha aur aik salaray wala
salaray main update krna tha using raise where
Transitive dependency
Inner vs left inner join
HAVING clause
Group by clause
Like operator
Where clause
Nested queries
Drop vs delete table
transactions in mongoodb
You have two tables one is user and other is ads now a user have
multiple ads you have to find that user who have the most ads
query 2nd largest salaray
https://www.examveda.com/sql/practice-mcq-question-on-sql-miscellaneous/
https://www.analyticsvidhya.com/blog/2017/01/46-questions-on-sql-to-test-a-data-science-professional-skilltest-solution/
DB SQL Query using joining table without using join keyword
2.What is a trigger in DB
3.What are functional and non functional requirements, sdlc
A is abstract class inherited by B and B is inherited by C. B did not
implement the function is this arise an error or not or is Class C
going to implement it or not. How errors resolved?
Overloading vs Overridng
Compile vs Runtime
Sql joins question is find second highest salary
Joins main say aik question must hay
Some basic questions about data science
Tools used to do data science
Basic question of sql
crud queries
Schema of Instagram
What is dependency injection
Implementation of cyclic dependency
What is cyclic dependency and give its example
What is dependency injection why we use this
- Normal forms
- ERD/schema
it?
schema of an e-commerce website
query to find the customer having maximum order in march
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
Indexing
Clustered and unclustered indexing
Erd(fixtures and teams) than write queries on that ERD
Draw ERD of your FYP
Difference between SQL and no-SQL databases, when to use
SQL, when to use no-SQL, advantages and disadvantages?
Q5: A customer paid a bill by checkingout on website. He is your
website customer. And the status of payment become paid. There
is no difficulty in the process. How to maintain data Integrity.
Q6 write a query to display product name and category name
where product ID is 1. Tables name are Product, Category and
Product Category
Q7: Design database of university its primary keys foreign keys of
student, teachers and courses and also write usecases
How to Prevent SQL Injection
Er diagram
Queries
Normalization (advatages disadvantaged)
How to optimise a querry
What are triggers
Diff b/w primary and secondary key at least 2 to 3
A case study was given and we had to design a database for it. Detailed ERD, relationships
among entities, mapping erd to SQL tables, basic queries to check for the loopholes in the design.
stack heap linked list types real life example
why linkedlist?
Searching in array vs linkedlist.
Divide and conquer
Arrays benefits and drawbacks?
Time complexity?
Insertion of element in middle of linkedlist. Any benefit over array?
6. Linkedlist vs array
7. Why can't access linkedlist 5th index while can do it in array
10. Space complexity of the factorial function
11. Where is stack located? Program k sath? Ya system k sath? Ya OS k sath?
14. Time complexity and space complexity of code
You are working with a team that is creating a new browser for your customers. You are assigned
the task to implement cache functionality in that text editor. What data structure you will be using
for this feature. Note: It's a LRU cache.
Queue
Trees
*Linked List*
Stack
A bit of DSA
Sorting algos time complexities and stuff
What is time complexity and how does it affect the execution
Diagrammatic flow of sorting algos
Find distance between two nodes of binary search tree.
Given a linkedlist remove duplicates without using extra space, write proper code covering all edge cases.
In singly linked LinkedList swap adjacent nodes like 1->2->3->4->5 to 2->1->4->3->5
queue implementation using stack
LRU page replacement algo
reverse linked list
Bst vs avl
Removal in bst
What is collision in hashing
Write code to check if Trees are mirror or not
What is arraylist
DSA structures(linear,nonlinear)
stack and linked list differnce
sorting alogorithms names
quick sort
Implement queue using stack
Combine 2 stacks in same order
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 ?
delete a node from linked list
find mddle node in both single linked list and double linked list
Return sum of even numbers in an array
Reverse Linked list
Find 2nd highest element of array.
What is pre-order post-oder and in-order traversal?
Difference between binary tree and binary search tree?
difference between array, linkedlist.
hash table
graph vs tree
bdf dfs
array vs ll
2d array to 1d array
- Delete middle node of linked List.
- What is BST,
- Inorder Recursion traversal Code
- Inorder, PostOrder, PreOrder
it can be like this, multiple sub arrays within an array. make this 1d but you cant use list
comprehension or built-in functions. simple loops but don't use too many loops.
answer: use recursion
Code 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.
you have to design a class of queue using stacks, how will enqueue/push and dequeue/pop work?
you receive a link list and an integer n, you have to reverse list in chunks of n!! i.e. 1 2 3 4 5 6 7
and n=3 result => 3 2 1 6 5 4 7
Delete a node of BST.
Merge two sorted arrays into new array.?
reverse a linked list? using any data structure?
reverse linked list in O(1) 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 number in O(N) time and O(1) space.
Find distance between to nodes in a BST.
Populate a BST from a given unsorted array.
Flatten a nested array. e.g Input: [1, 2, [3, 4, 5, [6]], 7, 8]
Output: [1, 2, 3, 4, 5, 6, 7, 8]
Find Intersection Point in Linked List
Check whether the link list 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 equals the sumq
Product of Array except itself
O(Nlgk)
Solution, Using
Heap, Via
Binary Merging
(As in merge
1. Solve a postfix expression stored in an array i.e ["2","3","+","6","*"] sort)
1. Find peak with maximum length in the array, a peak is defined as increasing values up to a
point and then it starts decreasing i.e [6,3,1,2,5,4,0,7] peak is 1,2,5,4,0
2. Find the inorder successor of the given key in a BST in log(N)
1. Given a BST. There is a next pointer in every node of the tree it should point to the right node in
the same level and the last 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
"a?b?d:e:c"
a
/ \
b c
/. \
d e
1. Given a string of ternery operator, check it is valid or not. e.g. "a?b:c" (true) "a?b?c:e:f?g"
(false) a?b?c:d:e(true)
2. A multilevel linkedlist is given. Convert it into flat(single level) list.
1. Given an array and average count the pairs who's average are equal to the given average.
2. Given a Linked list reverse linked list in k chunks.
1. Given a binary tree every node of tree should have a property of siblings which will point to its
next child.
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></body></html>"
Output: html
|
Body
/ \
a a
2. Reverse k sorted linkedlists
1. In a binary tree connect left nodes to the neighbour right nodes at the same level. e.g.
Input Tree
A
/\
B C.
/\ \
D E F
Output Tree
A--->NULL
/\
B-->C-->NULL
/\ \
D-->E-->F-->NULL
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 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 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
Given an array of integers, e.g. [-3, 2, 0,-5,1, 5], find all the triplets where sum = K. For K=0 output
is (-3,2,1), (-5, 0, 5)
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 play a game against an opponent by alternating turns. In ea
Find the third highest node in BST using O(1) space and in O(n) time
Delete the last occurence of an element from a linked list
Find the lowest common ansectors of two nodes having value n1 and n2 respectively.
Note: Ansectors will also include the node itself + the chain of parents of the nodes.
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
9. Stack and Queue Real life example
sorting algos complexity
Heap memory allocation vs stack memory allocation
- recursive solution
array vs LinkedList, why LinkedList
Difference b/w tree and graph
can we convert a tree into graph and vice versa
Find missing element in array
Directed Acyclic Graph
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
Difference between Stack and Queue and their implementation
Prirority queue with its implementation
Find an object from an array of object and delete it without affecting the order of object in array
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 return
their indexes
array based O(n) array given thi jnka sum 10 ho wo
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
Diff b/w stack and linked list
Diff b/w graph and tree
What we need to do before merge sort
What is quick sort
How can we measure the efficiency of two algos.....
print two dimensional array of NxN size using one loop and one variable
given an array of five positive integers. Calculate the mininum and maximum sum of 4 out of 5
integers. Calculate this in minimum time complexity
2. Given an integer array nums sorted in ascending order, remove the duplicates in place such
that each unique element appears only once. The relative order of the elements should be kept
the same. If there are k elements after removing the duplicates, then the first k elements of nums
should hold the final result. It does not matter what you leave beyond the first k elements.
Return k after placing the final result in the first k slots of nums. Example:
Input: nums = = [0,0,1,1,1,2,2,3,3,4]
Output: 5, nums = [0,1,2,3,4,__,__,__,__,__]
Your function should return k = 5, with the first five elements of nums being 0, 1, 2, 3, and 4
respectively. (Optional)
Given 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
2 arrays of integers are given find the 2nd array elements that are not in 1st array
Dsa ma sa linklist aur array ma difference aur uske bubble sort poocha
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 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 node func mai a rha wo del ho jae. baki sb wse hi
rhe....
- 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
Given a string "[(){}]" tell whether its a balanced brackets or not
Given a linked list delete its middle node
Write a recursive function to print the zig zag traversal of array Input : 5 7 2 1 4 Output : 5 4 7 1 2
i.e print in pairs 1st and last, 2nd and second last and so on,
Reverse a linked list using recursison
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?
BST ma max kitny nodes hotay hain. Inka kaam PHP aur Ruby on Rails ka ha, Python Node nhi
krtay ye log bilkul b.
There were three coding problems. Have to do code in Google docs file which is shared by screen
with Him.
1. Two arrays a and b. a is subset of b. there's only one element that is not in a but in 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.
LinkedList insertion at any position
Linked list ?
Why array over linked list?
about all data structures in which situations they are useful?
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 would you delete that node?
Q2) Recode parenthesis mismatch program, so that it will take half of the time compared to the
given example.
Linkedlist reverse
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
Contiguous memory
Find if the linked list is circular or not ( just explanation
Binary search tree ( properties of BST)
Define DSA
Linear vs Non Linear DS
Stack and Queue
How to implement stack
Binary Tree
Linked List
How to check given input list is circular linked list
(no code just logic)
Bubble sort program
Link list vs array
Phr program to find middle of link list
Agr even nodes ho to konse node middle hogi Odd me konsi
Tree m srf aik root node h .. ye BST hai ya ni
Array or linkedlist m searching ki time complexity, Agr koi random value search krni hai
Data structures ki definition
BST ki characteristics
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
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 array: 2, 9, 6, 3, 5, 10, 1
find largest difference in an array only from left to right
- diff b/w stack and heap
-diff b/w ArrayList and array
- when memory allocated on stack and heap
BST vs binary tree
Find distance between two nodes in bst
There are n sorted arrays find smallest common value
what are vectors
is vector an arraylist?
difference between vector, array, linkedlist
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 linkedlist
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)
Given a 2d array mxn, find all possible paths from 0,0 to a specific point inside the array. e.g the
point is 4,5 then find all possible paths from 0,0 to 4,5.
Check if a tree is BST or not.
convert array to bst
AVL tree and how rotations are performed
Best sorting algorithm in terms of time complexity?
There is a 2d array and each row is sorted. Write a code to find the minimum common number
present in all rows.
Link list behtar ya array behtar
Cdll ko dekhna ho ke yeh circular hai kese dekho gaey?
Efficient way kiya ho ga dekhnay ka
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.
Second question is the importance of Linked list over arrays.
-Why Linked list is teached till yet while most industry works in arrays.
(Agr apko lgta he k pointer memory ziada leta he LL me ya array me searching Hashing k through
fast hoti to ap galat hein 🫡)
-Stack ko kahi kissi problem me use kia kabhi?
array vs heap
- 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.
- Problem: Given an array, calculate and store (product of all entries of array except ith index) at
ith index
input: [1, 2, 3, 4, 5], the expected output would be [120, 60, 40, 30, 24]
Diff between stack and array
what is array?
Binary search
Which sorting algorithm is best and why
bst insertion removal complexity
1) You have an array and millions of numbers in that array. Give an efficient algo to find a specific
number in that array.
2) Now instead of array you have a linked list.
3) does doubly linked list makes any difference?
What is DSA? Linked List difference with arrays?
Trees and Graphs k operations ka pocha.
question
-- You
Swaphave
two an
integers
array without using 3rdand
[3,4,6,7,8,2,3,1] variable
you have a count n such as 4, so shift first 4 elements of array to the left
( at the end of array)
- find max sum in array and print its index
Here
loop. main twist was printing index and not BST.
small to larger ,so count is 3 then again 2 and 5 are also in increasing order so count is 2, and 0 is single so
count is 1,use
- Don't similary
extra ifarray
we have array 2,2,2,2 then again count is 1.So we return max count ,in above case it is 3.
- Do it in O(n)
Don't use recursion
Hint: Use Maps
Also
Hint: tell it's complexity
Recursion
Tell complexity
Display
Let's sayprime numbers
we have adam word for an instance, now we have to calculate distance between A TO D, D TO A, A TO
M, and show larger distance.
Aik pseudo code tha
https://leetcode.com/problems/add-two-numbers/
https://leetcode.com/problems/two-sum/
Program to swap to swap to variable without using third variable
Program to ellaboate interhirance
Program to ellaboate overloadind and overridding
Program for pallindrome
Program to reverser array
Program
Program toto implement queue
store objects using in
of a class array
array and then find that object whose type = "product" and have lowest
price value
Array ka size 10 hai 11th index pr value kese insert hogi
Swap two numbers without using third variable
https://leetcode.com/problems/integer-to-roman/
https://leetcode.com/problems/balanced-binary-tree/
https://cppsecrets.com/users/149371151041141171161059599111504898559548536410011611746979946105110/C00-MINI
// Write a function to multiply two matrices together
// 1. First matrix must be m x n and the second matrix is n x k
// 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/
P-1:
Given an integer array which has sub-integer arrays in it of depth N, write a function which returns a flat array
created from this array while maintaining the order of the integers in all arrays.
Input:
arr=[7, 3, 2, [22,[9, [0, 2], 3, 1], 4, 77], 45, [5], 0]
Output:
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 schema. Write tables
and define keys.
P-5:
labelled tags are wrong then what will be the minimum number of checks of fruits(picking fruit from any crate) in
order to find out the correct labels of all crates?
sol
arr[j];
}
salary DESC
LIMIT n-1, 1;
question sol
API's,Difference between get and post?
For Login Which API to use,post or get?
What is json, why do we use json?? And why they develop it?
Is JavaScript synchronous or asynchronous? And how asynchronous is handled?
Difference between var and let in context of scoping
Scope (local vs global)
Get vs Post request difference and which one to use when.
Status code when we'll do API call? (All 200-500 with explanation)
& Restful services are being used in your fyp?
API walay ki approach
What would happen if i use PUT instead of POST.
API testing
Rest & Soap API
-Restful Api
6. Data Structure mein sTack and Queue
7. After that he asked about React questions
8. Session and Cookies aur in depth and a gave a scenario on it
9. Difference b/w synchronous and asynchronous
10. Session and Cookies in depth(5 min lagey iss pey
11. Promises (JavaScript)
Web
Makeapplications
a interface( vs desktop
front end) ofapplications
how you dealdifference?
with any problem in your daily
life
Table ka format in html
Views
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
1: dif b/w display none & not visible css
2: Remove options from select and append new using jquery
MVC
API
Difference between Put and Patch.
What is header in https request.
Difference between Get and Post,
Can we do GET, POST, PUT, DELETE using POST only?
Default port of http and https.
Http vs https
What is hoisting
What is nodejs
What is express js
What is middleware
What is eventloop
Async instructions in js
Async/await
Error handling in js
advantages of react
why react is better then agular
synthetic events
uses of useEffect -----> multipel use cases
hexarical scooping
collesures
null vs undefine
window object vs document object
Redux ------> reflect changes
controlled vs uncontrolled components
highr order component
life cycle in react
how state manage in redux --- important
setState value in scope and outside of scope
lexical scope
types of scope
hoisting
primitive and non premitive
redux interview store action disapatcher reducer
map vs filter
for each vs map
map vs for loop and better time complexity
routing and protected routing
current and latest version of react express node mongodb
reat-router-dom latest version
why we do need functioal w.r.t class compnent
call back hell
props drealing
spread and rest operater
dom vs virtual dom
react use which dom
controlled vs controlled component
event loop working
micro task call stack
how api call function working
why react is better then angular
why library is better then framework
redux saga thunk
Javascript in detail
React Basics
What difference between normal and es6 function
Is node js is framework or language if not justify your answer
JavaScript is sync or async justify it
Is its sync how can you achieve asynchronous in js
Explain
to write athe Node js
function eventtake
which loopboth
phases
inputstep
andby stepthe index if subpattern
return
exist
Whatinis the pattern.between async/await and promises where you can use
difference
promise or async/await and why
Diff b/w POST and Get requests
HTML tags
Br, tb, td, are also asked lekin Maine JavaScript pe kaam nhi kya howa
JavaScript
aur DP padhi nhi is lye further questioning nhi hoi
Diff b/w === and ==
1.How to clone a object in JS (deep copy)
2.What is closure
3.State and props and difference between them
4) Make a http request using AJAX.
Hosting in js
UseEffect, state props
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?
Restful api
Cookies session
Or cookies client side pr locally kahan store hoti hn
Suppose there are two arrays, one is small while the other is significantly large. What would be the most suitable sorting algorit
Small Array Heap Sort, Large Array: Quick Sort
Small Array Quick St Large Array: Merge Sort
Small Array: Merge Sort, Large Array Merge Sort
*Small Array: Insertion Sort, Large Array. Merge Sort*
A fruit seller sells 3 mangoes and 4 apples for $17, and 4 mangoes and 6 apples for $23. What is the cost of one mango and o
Apple-$5, Mango-$0.5
Apple-$2, Mango-3
Apple-$1, Mango=4
*Apple-$0.5, Mango=$5*
Three people are standing In a queue. Lets name them Alex, John and Maria. Alex is fourteenth from the front and John is seve
while Maria is exactly in between Alex and John. If Alex is ahead of John and there are 48 persons in the queue, how many per
Alex and Maria?
6
*7*
8
9
Analytical Questions
Math ratio
probability related some English questions opposite/synonyms/paragraph
8 balls and one ball wight is more. Find high weight ball in less terms?
15 Manufacture produce 27 balls in 1 hour, if there is 45 manufactures how many
ball they will make in 40 minutes.
3 and 5 litre jug problem (measure 4 litre water)
Price of the ball and bat combined is 1.15$ and the bat is 1$ more then ball. Tell the price of ball
4. 5 men make 5 products in 5 minutes. How much time will it take to make 100 products by 10p men.
Two ropes are given and each rope burns completely in 1 hour. Measure 45 minutes using them
8 balls are given. Only one of them has different mass. You have been given a balance find the ball with the different mass with
1 coin has more weight in 8 coins. In how many tries you can eliminate it.
You have 3 buckets of 3 and 5 liters full exact 4 litre water using these
3 boxes of apples, oranges and mixes fruits full are wrong labeled you have to label them correctly how much moved do you ne
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
Ek flower garden related thi. Jis me flower hr din double ho jate hain. Agr vo garden flowers se full hone ke liye 100 days lagain
one candy costs one rupees. if you return three wrappers, you'll get an extra candy. how many candies you get for 15 rupees
Divide a cake into 8 equal pieces in 3 cuts
You have 4 tablets, 2 of one type and 2 of other, your task is to eat 2 tablets of one type each. How is that possible?
time is 3:15 ,tell the angle between minute needle and hour needle.
Measure 4 L water from a jar of 3L and 5L.
You have given 25 horses and have to find top 3 in minimum races.Only five horses can participate in a race.
Two trains are moving towards each other with a speed of 80KM/h. There is a distance of 1
them. There is a bird on the front side of first train which move towards second train and re
the bird reached the front of the second train. The bird speed is 70km/h. What will be the to
covered by the bird when both trains will collide.
you have to correctly label, 3 wrongly labeled bags in 1 try (pick 1 ball from any bag).1 of them(M) has mix Red or Black balls, o
one has only Black(B) balls.
Two trains are moving towards each other with a speed of 200KM/h. There is a distance of 400km between them. There is a b
train which move towards second train and return back when the bird reached the front of the second train. The bird speed is 3
the total distance covered by the bird when both trains will collide. Another Case: Distance between them is 200km
pick 1 heavy ball from 8 balls in 2 attempts
you have two candles, each can burn on both ends. Each candle take 60 minutes to burn when burn from one side only, similar
burn from both sides. Estimate 45 minutes by using 2 such candles. you have no time, or any scale or measure.
1 factory 10 machines making coins of 10g each, 1 machine is making coins of 9g, identify that machine with the help of a weig
reading on weight machine once
2 blue pills 2 red pills, blind man has to eat one of them every day and night how will he identify them
resolve senarion -------> we have 5 orders for the time being we have to delete it in this way if need in future then we can acce
You have 2 bulbs and a building having multiple floors .At a certain floor if you drop bulb it crash.You have 2 bulbs.figure out flo
2. Each box has a capacity k and can hold at most 2 gifts. Find the minimum number of boxes to accommodate all the gifts.
Q.You have unlimited pieces of rope and each piece burns in exactly 30 minutes. Calculate 105 minutes
Q. You have 40 heads and 10 tails and you have divided these coins equally or unequally.
Ensure that there are equal no of tails on both sides
and you are allowed to flip a coin on entire side
Hiw will you tell your Grand Mather you are doing Software Engineering on Phone call provided she has no education and she
- cake k 8 pieces krne 3 cuts me
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
Naam ma HeadQuaters likha ha, laikin andr siraf 4,5 loog bethay hotay hain.
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.
If a clock is showing time of 3:20 what is the angle between its hour and minutes hands.
There are three buttons in a room, you have to tell that which button turned on the LIGHT in room. you can only enter the room
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 attempt
- 8 Ball problem, find one with less weight( analytical)
How do we measure the volume of the cylinder? What is the surface area of the cylinder, What is a cuboid?
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. Whe
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 an
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?
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.
There are two ropes and each of them takes exactly 1 hour to burn. Find a way to find when 45 minutes have passed by burnin
1: a man was walking when it started to rain. his clothes got wet but no hair is wet why? he's bald
2: there are 5 apples in basket. divide them among 5 girls such that each girl gets an apple and there remains an apple in bask
3: father and son's age is such that father's age is reverse of son's age and the sum of their ages is 66. find their age and give 3
15+51)
4: a duck is given $9, bee is given $27, spider is given $36. how much would you give to a cat? $18
5: u bought a phone. it's cost including phone cover is $110. such that cell phone costs 100 more than phone cover. how much
105
6: u travel 32923 miles which is a pallindrome. give minimum how much more miles u need to travel to make another pallindrom
7: a clock was moved from 2 o'clock to 9 o'clock on anti clockwise direction. what's the angle moved
8: complete the series: 19, 7, 23, 11, 27, 15 .....
●divide a cake in 8 parts using 3 cuts only
liye kitne din lagaen ge
shapes together and treat them as a single object. Which
design pattern would you use to implement this feature?
Factory Pattern
*Composite Pattern*
State Pattern
Observer Pattern
Singleton pattern
-Design Patterns (Singleton)
-Sdlc phases (waterfall,Agile,scrum)
design patterns
SDLC
what
if youare
havemethods
limited to getand
time requiremnts from
unclear req clint.
how you start
project?
cloud computing
Box model in css
Association / Composition / Aggregation
What is singleton Pattern?
- Design patterns
Factory and Singleton
Design
Singleton Pattern
Pattern implementation without static keyword,
it's
Q2: what isexample
real life Singleton design pattern and how do we
implement it?
Q3: Explain Observer design pattern
How can we measure the size of project
What is agile
What are the and xp
non-functional requirements of a project give
some examples
What is the most important stage of waterfall model
Functional points in project
Some questions from design pattern and
Design patterns thy 2 observer and pub/sub
First there was a simple written assessment comprising of general questions like: -
What kind of work environemnt do you prefer?
Why are u applying for this role? What is your competitive edge over other candidates? How to enter a new
market, give an example? Etc.
And a long question (300 words). It said write an application of Machine Learning in Marketing
Then there was a couple of questions' interview with the HR asking about things on my resume and where i live
would i like to join for 15k stipend, etc
Then a short interview with a technical person. He asked about all the things on my resume and few technical
questions; what is a gant chart, what is a bug report? What would be the cost of making 15 customized web
pages? What are the respinsibilities of project managers? How do you handle a challenge, give an example?
Behavioral Interview (Introduction, past experiences, leadership experience, failures)
1. Introduction
Also had to write an explanation of any one solution at the end of first two technical interviews
2. Past experience
1. Fyp related questions
4. Questions about Github/version control.
CV
Projects
Interests
Baqi why to join company
And general questions to judge personality and to check way of. Communication
-FYP Schema
-Scenerios (if this happens then change in schema etc)
-Query related to that schema
-Coding Question(Related to FYP)
Third Interview
Create ERD for FYP
Query on FYP ERD
Detailed discussion on FYP.
What, need, role of each member
1.FYP sa related question thay
intro
fyp
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?
FYP
Qs related to FYP ?What tools and technologies ? What is your role?
6) rate yourself from 1 to 10 in jQuery, bootstrap, and JavaScript.
-Introduce yourself
-Explain your FYP
-What is your timetable
-Can you join us from June 1st? Timmings were: 10-7
-FYP discussion
-Where do you see yourself in 2 years.
-What do you expect from this trenee program.
-Why develepors studio
FYP related Questions
Fyp stack discussion
FYP (where you will deploy it)etc
What's your FYP? Your role in your FYP?
Intro
Why choose Qbatch
Why Qbatch should hire you
Goal in 5 years
Goal in life
Goal in long-term career
Expected salary
Fyp discussion sbse pehle Then thore se web based questions because mera fyp web me hai, Phr oop questions
Then he asked which data structure u like the most i said link list
Phr db questions
After that a senior developer came and asked me to solve matrix multiplication problem. Then he gave me a
leetcode question of jump game ( min number of jumps to reach the end). (1.5 hrs long).
why you want to join Tajir?
What is your 5 years plan?
What type of company you prefer or what is your dream company?
Which tech stack you prefer?
What is the business model of tajir?
How can you contribute to the success of tajir?
What you think that how tajir business can expand?
( This interview was quite friendly and relaxing. I was feeling like I am talking to my old friend :XD)
- Fyp discussion (why this, what do you hope to achieve, jo results atay usko evaluate kesay kro 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
introduction
-fyp(your role , blockchain konsi use kr rhy , iske alternative kon konsy)
- what will be tha angle b/w hands of clock when it's 3:25
Libraries used in Fyp
Do you have any in experience in Flutter?
Activity lifecycle?
What is Android Gradle?
What is android manifest file?
What are broadcast receivers?
What are intents?
Types of intents?
Explain different types of layouts in android?
Introduction
FYP
Architecture of FYP
Libraries used in Fyp
Do you have any in experience in Flutter?
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
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
fyp stack discussion
Supervised Learning
Curse
NaivesofBayes
dimensionality
Python simple code Mostly
objective
Differencehe tha
between RNN and CNN Linear
Regression
mostly mcqs the ROCForest)
(Random Curve Language models
konsy achay like Bert lstm etc
OOAD/
OOP DB DSA SE/SRE General
-inheritnce
static
keyword
* basic
question(In
hertience ,
polymorphis
m ,encapsul
ation,abstr
action)
Algo and
data
structure
* In which
scenario
Trees will
be
beneficial
* In which
scenario
LinkedList
will be
beneficial
///// array
or
arraylist
will be
beneficial
* Trees
LinkedList
etc time
complexity
OS
OS / Networking WEB Analytical
* what is threading Hoisting
- Event loop if ak function ka wait ho
to kia kren gy
* single vs multithreading - Closure
- memoizatiin
- state vs prop
- diffing algo
- virtual dom
- Reconciliation
- setState is async
- axios
- axios interceptors
- ref
- calling a child function from parent-
refs
- hooks / useEffect
- Auth
- flow
- Redux
- structure / flow
- hooks
- middleware (thunk)
- useLayoutEffect
- useEffect
- Profiler
- useMemo
- useCallback
- LazyLoading
- React.Memo
- PureComponent(For Class Component
Only)
-usememo
-usecallback
-event bubling
-bind
-------
payment gateway
sockets
micro services
middelware how do you structure your
project event loop sync asyct call abck
promis async await
Comment
SQA s
List of HR email of most companies
Here is a list of companies offering Ai/ML related jobs :
*Dehqaan.ai*
*I2C*
*Quid Sol*
*StackIntel* : https://stackintel.io/career/
*Logixos* : https://logixos.com/apply/
*Slashnext* : [email protected]
*Experts Solutions*
*ALL OTHERS:*
*Wavetec* : [email protected]
*VentureDive*: https://venturedive.applytojob.com/#resumator-job-listings
*Contour Studio* : https://www.linkedin.com/jobs/view/3569763616
*Ibex* : [email protected]
*Sapphire Mills* : [email protected]
*Programmers Force* : [email protected]
*Momin solutions* : [email protected]
*Heuristiks* : [email protected]
*OneClout* : [email protected]
*Esspk* : [email protected]
*ZenKage Technology* : [email protected]
*Care Pakistan* : [email protected]
*Adex360* : [email protected]
*Focustech* : [email protected]
*TheTalentPull* : [email protected]
*muSharp* : [email protected]
*Fantech Labs* : [email protected]
*codistan* : www.codistan.org/internship
*Cofcode software house* : [email protected]
It looks simple, but jab wo question krty hai , to kuch b simple nahi rhta, although dekhny ma bohaat asan questions hain, pr wo
bohaat ghumah k question krin gy,rata wla kaam wo nahi poch rahy tag, or baki companies sy zra hat k interview tha.
Tip: problem ko asan smj k kry ga, agr complex samjhin gy to solution complex sy hi start ho ga, mainly wo ap ka confidence
dekh rahy hota apny answer pr