Filter interviews by
I applied via LinkedIn and was interviewed before Aug 2023. There were 3 interview rounds.
Market study & industry
Top trending discussions
The function checks if a string is a substring of another string.
Use the built-in string methods like 'indexOf' or 'includes' to check for substring.
If the language supports regular expressions, you can also use them to find substrings.
Consider the case sensitivity of the strings when comparing.
Code to multiply two matrices of dimension M*N and N*K.
Create a result matrix of dimension M*K.
Iterate through each row of the first matrix.
For each row, iterate through each column of the second matrix.
For each element in the row of the first matrix, multiply it with the corresponding element in the column of the second matrix.
Sum up the products and store the result in the corresponding position of the result matrix.
...
SQL query to perform matrix multiplication using two tables with row, col, and value columns.
Use JOIN operation to combine the two tables based on matching row and col values.
Use GROUP BY clause to group the result by row and col values.
Use SUM function to calculate the dot product of corresponding row and col values.
Use INSERT INTO statement to insert the result into a new table.
Prototype in JavaScript is an object that is associated with every function and object by default.
Prototype is used to add properties and methods to an object.
It allows objects to inherit properties and methods from other objects.
Modifying the prototype of a function affects all instances of that function.
Prototypes can be used to create new objects based on existing objects.
The prototype chain allows for property and
Classes in JavaScript are written using the class keyword.
Use the class keyword followed by the class name to define a class.
Use the constructor method to initialize class properties.
Add methods to the class using the class prototype.
Use the new keyword to create an instance of the class.
The number of different ways to climb a ladder of N steps by taking 1 or 2 steps at a time.
This is a classic problem that can be solved using dynamic programming.
The number of ways to climb N steps is equal to the sum of the number of ways to climb N-1 steps and N-2 steps.
The base cases are when N is 0 or 1, where there is only 1 way to climb the ladder.
For example, for N=4, there are 5 different ways: [1, 1, 1, 1], [1
Print a square matrix in spiral order
Start by defining the boundaries of the matrix
Iterate through the matrix in a spiral pattern, printing each element
Adjust the boundaries after each iteration to move inward
Repeat until all elements are printed
Retrieve the second highest marks obtained by each student from a table with student name, subject, and marks.
Use the RANK() function to assign a rank to each row based on the marks in descending order.
Filter the result to only include rows with rank 2 for each student.
Group the result by student name to get the second highest marks for each student.
The .live() method attaches an event handler to the current and future elements, while .delegate() attaches an event handler to a parent element.
The .live() method is deprecated in newer versions of jQuery.
The .delegate() method is preferred over .live() for performance reasons.
Both methods are used to handle events for dynamically added elements.
Example: $(document).live('click', 'button', function() { ... });
Example:...
Chaining in jQuery allows multiple methods to be called on a single element in a single line of code.
Chaining simplifies code and improves readability.
Each method in the chain operates on the result of the previous method.
The chain ends with a method that does not return a jQuery object.
Example: $('div').addClass('highlight').fadeOut();
A callback function is a function that is passed as an argument to another function and is executed later.
Callback functions are commonly used in event-driven programming.
They allow asynchronous execution of code.
Callback functions can be used to handle responses from APIs or user interactions.
They can be anonymous functions or named functions.
Example: setTimeout(function() { console.log('Hello!'); }, 1000);
The .bind() function in jQuery is used to attach an event handler function to one or more elements.
It allows you to specify the event type and the function to be executed when the event occurs.
The .bind() function can be used to bind multiple events to the same element.
It can also be used to pass additional data to the event handler function.
The .bind() function is deprecated in jQuery version 3.0 and above. It is reco
The angle between the hour and minute hands of a clock can be calculated using a formula.
The hour hand moves 30 degrees per hour and 0.5 degrees per minute.
The minute hand moves 6 degrees per minute.
Calculate the angle between the two hands using the formula: |30H - 11M/2|, where H is the hour and M is the minute.
Yes, it is possible to create a slideshow without using JavaScript.
Use CSS animations and transitions to create the slideshow.
Use HTML and CSS to structure and style the slideshow.
Utilize keyframe animations to create the slide transitions.
Use radio buttons or checkboxes to control the slideshow navigation.
Apply the :target pseudo-class to create a simple slideshow without JavaScript.
The men can take turns riding the scooter, allowing them to reach point B faster.
The men can form a queue and take turns riding the scooter.
The person riding the scooter can drop it off at a certain point and the next person can pick it up.
The scooter can be passed along the line of men until everyone reaches point B.
I was interviewed before Feb 2021.
Round duration - 90 minutes
Round difficulty - Medium
Questions on aptitude, English, logical reasoning, C/C++ and 5 coding ques. (only pseudo code).
Bob and his wife are in the famous 'Arcade' mall in the city of Berland. This mall has a unique way of moving between shops using trampolines. Each shop is laid out in a st...
Find the minimum number of trampoline jumps Bob needs to make to reach the final shop, or return -1 if it's impossible.
Use Breadth First Search (BFS) algorithm to find the minimum number of jumps required.
Keep track of the visited shops to avoid revisiting them.
If a shop has an Arr value of 0, it is impossible to reach the final shop.
Return -1 if the final shop cannot be reached.
Given two strings, S
and X
, your task is to find the smallest substring in S
that contains all the characters present in X
.
S = "abdd", X = "bd"
Find the smallest substring in S that contains all characters in X.
Use a sliding window approach to find the smallest window in S containing all characters of X.
Maintain a hashmap to keep track of characters in X and their frequencies in the current window.
Slide the window to the right, updating the hashmap and shrinking the window until all characters in X are present.
Return the smallest window found.
Example: S = 'abd
You need to determine all possible paths for a rat starting at position (0, 0) in a square maze to reach its destination at (N-1, N-1). The maze is represented as an N*N ma...
Find all possible paths for a rat in a maze from start to destination.
Use backtracking to explore all possible paths in the maze.
Keep track of visited cells to avoid revisiting them.
Return paths in alphabetical order as a list of strings.
Round duration - 60 minutes
Round difficulty - Easy
Questions based on OOPS were asked in this round.
A virtual function is a function in a base class that is declared using the keyword 'virtual' and can be overridden by a function with the same signature in a derived class.
Virtual functions allow for dynamic polymorphism in C++
They are used in inheritance to achieve runtime polymorphism
Virtual functions are declared in a base class and can be overridden in derived classes
They are called based on the type of object bei...
Types of polymorphism in OOP include compile-time (method overloading) and runtime (method overriding) polymorphism.
Compile-time polymorphism is achieved through method overloading, where multiple methods have the same name but different parameters.
Runtime polymorphism is achieved through method overriding, where a subclass provides a specific implementation of a method that is already defined in its superclass.
Polymor...
Deep copy creates a new object and recursively copies all nested objects, while shallow copy creates a new object and copies only the references to nested objects.
Deep copy creates a new object and copies all nested objects, while shallow copy creates a new object and copies only the references to nested objects.
In deep copy, changes made to the original object do not affect the copied object, while in shallow copy, ch...
Round duration - 30 minutes
Round difficulty - Easy
HR round with typical behavioral problems.
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
I got to participate in a robotics competition at IIT
Designed and built a robot from scratch
Programmed the robot to complete tasks autonomously
Competed against other teams from different colleges
Learned valuable skills in engineering and teamwork
I chose IIT for its reputation and opportunities. No regrets. The environment is competitive and challenging.
IIT has a strong reputation for producing successful graduates
I was attracted to the opportunities for research and innovation
The academic environment is highly competitive and challenging
I have no regrets about my decision to attend IIT
A portfolio is a collection of investments. Risk can be measured through standard deviation, beta, or value at risk.
A portfolio is a combination of different investments such as stocks, bonds, and mutual funds.
The purpose of a portfolio is to diversify investments and reduce risk.
Risk can be measured through standard deviation, which measures the volatility of returns.
Beta measures the sensitivity of a portfolio to mar...
Beta is a measure of a stock's volatility. Value at risk is a statistical measure of potential losses. Formula for beta is Covariance(Stock, Market) / Variance(Market).
Beta measures a stock's sensitivity to market movements.
Value at risk is the maximum potential loss that an investment portfolio may suffer within a given time frame.
Beta formula is calculated by dividing the covariance of the stock and market returns by...
Covariance measures the relationship between two variables. It measures sensitivity by indicating the direction of the relationship.
Covariance is a statistical measure that shows how two variables are related to each other.
It measures the direction of the relationship between two variables.
A positive covariance indicates that the two variables move in the same direction.
A negative covariance indicates that the two vari...
WACC is the weighted average cost of capital. To value a company, one can use various methods such as DCF, comparables, or precedent transactions. A method to decide on project undertaking is NPV analysis.
WACC is the average cost of all the capital a company has raised
To value a company, one can use DCF, comparables, or precedent transactions
DCF involves projecting future cash flows and discounting them back to present...
I am impressed with the company's reputation and growth potential, and I believe my skills and experience align well with the job requirements.
I have researched the company and am impressed with its reputation and growth potential
I believe my skills and experience align well with the job requirements
I am excited about the opportunity to work with a talented team and contribute to the company's success
I have the necessary skills, experience, and passion to excel in this role.
I have a proven track record of success in similar roles.
I am a quick learner and adaptable to new situations.
I am passionate about this industry and eager to contribute to its growth.
I have excellent communication and teamwork skills.
I am committed to delivering high-quality work and exceeding expectations.
I would prioritize completing my current assignment and then discuss the transfer with my supervisor to ensure a smooth transition.
I would communicate with my supervisor to understand the urgency of the transfer
I would prioritize completing my current assignment to the best of my ability
I would discuss the transfer with my supervisor to ensure a smooth transition
I would try to complete as much work as possible before l...
A batsman can score a maximum of 264 runs in an ODI.
The maximum number of runs a batsman can score in an ODI is limited by the number of balls bowled and the number of boundaries hit.
The maximum number of balls bowled in an ODI is 300, assuming no extras are bowled.
If a batsman hits a boundary off every ball they face, they can score a maximum of 240 runs.
If a batsman hits sixes off every ball they face, they can score...
Solving two jug problems to obtain a specified amount of water using differently sized jugs.
Understand the capacity of each jug
Determine the amount of water needed
Fill one jug with water and pour it into the other jug
Repeat until the desired amount is reached
Use the remaining water in the larger jug to measure the remaining amount needed
Consider the possibility of multiple solutions
I was interviewed before Feb 2021.
Round duration - 65 minutes
Round difficulty - Easy
There were 2 sections –
Aptitude and Logical Reasoning and MCQ based on Java question ,C++, coding for 20 min and 45 min respectively.
Section A- Not very difficult to clear this round although less time was a problem.
Section B- It contains 15 multiple choice question on c/c++,java and 4 simple coding questions
Determine if a given singly linked list of integers forms a cycle or not.
A cycle in a linked list occurs when a node's next
points back to a previous node in the ...
Detect if a singly linked list forms a cycle by checking if a node's next pointer points back to a previous node.
Traverse the linked list using two pointers, one moving at double the speed of the other.
If the two pointers meet at any point, there is a cycle in the linked list.
Use Floyd's Cycle Detection Algorithm for O(N) time complexity and O(1) space complexity.
Round duration - 75 minutes
Round difficulty - Medium
It was an online coding test in which 3 coding question were given.
Given two strings, S
and X
, your task is to find the smallest substring in S
that contains all the characters present in X
.
S = "abdd", X = "bd"
Find the smallest substring in string S that contains all characters in string X.
Iterate through string S and keep track of characters in X found in a window
Use two pointers to maintain the window and slide it to find the smallest window
Return the smallest window containing all characters in X
Given a non-decreasing sorted array ARR
of N
positive numbers, determine the smallest positive integer that cannot be expressed as the sum of elements from...
Find the smallest positive integer that cannot be expressed as the sum of elements from any proper subset of a non-decreasing sorted array of positive numbers.
Start with the smallest possible integer that cannot be represented, which is 1.
Iterate through the array and update the smallest integer that cannot be represented.
If the current element is greater than the smallest integer that cannot be represented, return tha...
Given a square chessboard of size 'N x N', determine the minimum number of moves a Knight requires to reach a specified target position from its initial position...
Calculate the minimum number of moves a Knight needs to reach a target position on a chessboard.
Implement a function that takes knight's starting position, target position, and chessboard size as input
Use breadth-first search algorithm to find the shortest path for the Knight
Consider all possible 8 movements of the Knight on the chessboard
Return the minimum number of moves required for the Knight to reach the target po
Round duration - 60 minutes
Round difficulty - Easy
It started with a discussion on the programs given in coding round. They asked me about my interest field after that they directly jumped into Networking, Linux and Ethical Hacking part looking my interest domain. They asked me various question on networking and linux.
Then they asked me to code a simple c program
Given a singly linked list of integers, return the head of the reversed linked list.
Initial linked list: 1 -> 2 -> 3 -> 4 -> NULL
Reversed link...
Reverse a singly linked list of integers and return the head of the reversed linked list.
Iterate through the linked list and reverse the pointers to point to the previous node.
Keep track of the current, previous, and next nodes while reversing the linked list.
Update the head of the reversed linked list as the last node encountered during reversal.
FTP uses port number 21 and SMTP uses port number 25.
FTP uses port 21 for data transfer and port 20 for control information.
SMTP uses port 25 for email communication.
Understanding port numbers is important for network communication.
The OSI Model is a conceptual framework that standardizes the functions of a telecommunication or computing system into seven layers.
The OSI Model stands for Open Systems Interconnection Model.
It consists of seven layers: Physical, Data Link, Network, Transport, Session, Presentation, and Application.
Each layer has specific functions and communicates with the adjacent layers.
Example: Layer 1 (Physical) deals with physi...
To copy files in Linux, you can use the 'cp' command.
Use the 'cp' command followed by the source file and destination directory to copy a file.
To copy a directory and its contents, use the '-r' flag with the 'cp' command.
You can also use wildcards like '*' to copy multiple files at once.
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
based on 1 interview
Interview experience
Ola Cabs
Uber
RedBus
MakeMyTrip