Filter interviews by
Be the first one to contribute and help others!
I appeared for an interview before Jan 2021.
Round duration - 90 minutes
Round difficulty - Medium
It was conducted in Hacker rank which consisted of 10 aptitude questions that included C, C++, Java MCQ. 2 programming questions were also given.
Given an N x M
matrix filled with integers, determine the minimum sum obtainable from a path that starts at a specified cell (x, y)
and ends at the top left corner of t...
The problem involves finding the minimum sum path from a specified cell to the top left corner of a matrix.
Start from the specified cell and calculate the minimum sum path to reach the top left corner using dynamic programming.
Consider the three possible moves: down, right, and down-right diagonal.
Keep track of the minimum sum at each cell and update it based on the minimum of the three possible moves.
Finally, the mini...
Given an integer N
representing the number of pairs of parentheses, find all the possible combinations of balanced parentheses using the given number of pairs.
Generate all possible combinations of balanced parentheses for a given number of pairs.
Use backtracking to generate all possible combinations of balanced parentheses.
Keep track of the number of open and close parentheses used in each combination.
Recursively generate combinations by adding open parentheses if there are remaining, and closing parentheses if the number of open parentheses is greater than the number of clo...
Round duration - 60 minutes
Round difficulty - Medium
Technical round with questions based on data structures, oops and networking.
Create a program that counts and prints the total number of specific character types from user input. Specifically, you need to count lowercase English alphabets, numeric digi...
Create a program to count lowercase alphabets, digits, and white spaces from user input until '$' is encountered.
Read characters from input stream until '$' is encountered
Count lowercase alphabets, digits, and white spaces separately
Print the counts of each character type as three integers separated by spaces
Given an unsorted array containing 'N' integers, you are required to find 'K' largest elements from the array and return them in non-decreasing order.
The fir...
Find K largest elements in an unsorted array and return them in non-decreasing order.
Sort the array in non-decreasing order.
Return the last K elements of the sorted array.
To check internet connection on a system, you can use various methods like pinging a website or checking network status.
Use ping command to check connectivity to a website (e.g. ping www.google.com)
Check network status using network settings or command line tools
Try accessing a website or online service to verify internet connection
When you type a URL in a web browser, the browser sends a request to the server hosting the website, which then responds with the necessary files to display the webpage.
Browser checks cache for DNS resolution
If not found, browser sends a DNS query to resolve the domain name to an IP address
Browser establishes a TCP connection with the server
Browser sends an HTTP request to the server for the webpage
Server processes the...
Round duration - 60 minutes
Round difficulty - Medium
Technical round with questions based on data structures, oops and networking.
Ninja is learning about sorting algorithms, specifically those that do not rely on comparisons. Can you help Ninja implement the counting sort algorithm?
Implement counting sort algorithm to sort an array of integers without comparisons.
Count the frequency of each element in the input array.
Calculate the prefix sum of frequencies to determine the position of each element in the sorted array.
Place each element in its correct position based on the prefix sum.
Time complexity of counting sort is O(n+k), where n is the number of elements and k is the range of input.
Example: ...
The Fibonacci series has applications in various fields such as mathematics, computer science, art, and nature.
Used in algorithms for optimization problems and dynamic programming.
Found in nature, such as the arrangement of leaves on a stem, the branching of trees, and the spiral shapes of shells.
Applied in financial markets for predicting stock prices and analyzing market trends.
Utilized in art and design for creating
Round duration - 30 minutes
Round difficulty - Easy
HR round where the interviewer asked questions to know more about me.
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 appeared for an interview before Jan 2021.
Round duration - 60 minutes
Round difficulty - Easy
Technical Interview Round with questions based on Data structures, OOPS and SQL.
You are provided with a linked list of integers. Your task is to implement a function that deletes a node located at a specified position 'POS'.
The first line co...
Implement a function to delete a node from a linked list at a specified position.
Traverse the linked list to find the node at the specified position.
Update the pointers of the previous and next nodes to skip the node to be deleted.
Handle edge cases such as deleting the head or tail of the linked list.
Ensure to free the memory of the deleted node to avoid memory leaks.
SQL query to find the nth highest salary
Use the ORDER BY clause to sort salaries in descending order
Use the LIMIT and OFFSET clauses to skip the first n-1 highest salaries
Combine the above steps in a single query to find the nth highest salary
OOP is a programming paradigm based on the concept of objects, which can contain data in the form of fields and code in the form of procedures.
OOP focuses on creating objects that interact with each other to solve problems.
Key concepts include encapsulation, inheritance, and polymorphism.
Encapsulation involves bundling data and methods that operate on the data into a single unit.
Inheritance allows classes to inherit at...
Round duration - 60 minutes
Round difficulty - Easy
Was asked me about my favorite technologies, What i liked about Facebook. And asked me to design a cinema ticket reservation web site like the one satyam has.
Given an array containing N
distinct positive integers and a number K
, determine the Kth largest element in the array.
N = 6, K = 3, array = [2, 1, 5, 6, 3, ...
Find the Kth largest element in an array of distinct positive integers.
Sort the array in non-increasing order and return the Kth element.
Handle multiple test cases efficiently.
Ensure all elements in the array are distinct.
Virtual functions are functions in a base class that are overridden in derived classes to achieve runtime polymorphism.
Virtual functions are declared in a base class with the 'virtual' keyword.
They are overridden in derived classes using the 'override' keyword.
They allow a function to be called based on the runtime type of an object.
Virtual functions enable dynamic binding and late binding in C++.
Example: virtual void ...
Design a Cinema Ticket Reservation System
Use a database to store movie information, showtimes, and seat availability
Allow users to search for movies, select showtimes, and choose seats
Implement a payment system for ticket purchases
Send confirmation emails with QR codes for ticket validation
You can find a defective ball among 10 given balls in 2 attempts using a two-pan balance scale.
Divide the 10 balls into two groups of 5 each.
Weigh the two groups on the balance scale.
If one group is heavier, it contains the defective ball. If they are equal, the defective ball is in the remaining 5 balls.
Divide the group of 5 balls with the defective one into two groups of 2 and 3 balls.
Weigh the two groups on the bala...
Round duration - 30 minutes
Round difficulty - Easy
HR round that lasted for about 30 minutes. The interviewer asked me questions to know more about me and a puzzle.
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 appeared for an interview before Jan 2021.
Round duration - 60 minutes
Round difficulty - Easy
I couldn't find an optimal approach to the first question, so she skipped that question and proceeded to next questions. Remaining questions I have answered satisfactorily.
Given an array/list of positive integers and an integer K, determine if there exists a subset whose sum equals K.
Provide true
if such a subset exists, otherwise r...
Given an array of positive integers and an integer K, determine if there exists a subset whose sum equals K.
Use dynamic programming to solve this problem efficiently
Create a 2D array to store if a subset with a particular sum exists
Iterate through the array and update the 2D array accordingly
Check if the value at the end of the iteration is true for the given K
Given an undirected and disconnected graph G(V, E) where V vertices are numbered from 0 to V-1, and E represents edges, your task is to output the BFS traversal starting from the ...
BFS traversal in a disconnected graph starting from vertex 0.
Implement BFS algorithm to traverse the graph starting from vertex 0.
Use a queue to keep track of visited nodes and their neighbors.
Ensure to print the traversal sequence in the correct order.
Handle disconnected components by checking for unvisited nodes.
Follow the BFS approach of exploring neighbors before moving to the next level.
Round duration - 60 minutes
Round difficulty - Easy
I told that my strength is problem solving and I can always find a way when there is a bottle-neck. Gave some examples of my experiences while doing my assignments.
Given a string STR
consisting of words separated by spaces, your task is to replace all spaces between words with the characters "@40".
The first line contains an integ...
Replace spaces in a string with '@40'.
Iterate through each character in the string
Replace spaces with '@40'
Return the modified string
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 applied via Referral
I applied via Referral and was interviewed in Jan 2021. There was 1 interview round.
I applied via Naukri.com and was interviewed in Mar 2021. There was 1 interview round.
I applied via Naukri.com and was interviewed in Mar 2021. There was 1 interview round.
Program to create a spiral array using 2D-array
Create a 2D-array with given dimensions
Initialize variables for row, column, and direction
Fill the array in a spiral pattern by changing direction when necessary
Return the spiral array
I appeared for an interview before Sep 2020.
Round duration - 70 minutes
Round difficulty - Medium
It consisted of three coding questions varying from easy to medium.
You are provided with the root of a binary tree that consists of 'N' nodes. Each node in this tree contains coins, and the total number of coins across all nodes is equ...
Determine the minimum number of moves required to distribute coins in a binary tree so that every node has exactly one coin.
Traverse the binary tree in a bottom-up manner to distribute coins efficiently.
Keep track of the excess or deficit of coins at each node to calculate the minimum moves required.
Transfer coins from nodes with excess coins to nodes with deficits to balance the distribution.
Example: For the input ROO...
Given an array arr
of N integers that may include duplicates, determine the number of subsets of this array containing only distinct elements.
The result should be returned modulo ...
Count the number of distinct-element subsets in an array modulo 10^9+7.
Iterate through the array and keep track of distinct elements using a set.
Calculate the number of subsets using the formula 2^distinct_count - 1.
Return the result modulo 10^9+7 for each test case.
A thief is robbing a store and can carry a maximal weight 'W' in his knapsack. There are 'N' items, where the i-th item has a weight 'wi' and value 'vi'. Consider the maximu...
The 0-1 Knapsack Problem involves maximizing the value of items a thief can steal within a weight limit.
Use dynamic programming to solve the problem efficiently.
Create a 2D array to store the maximum value that can be achieved at each weight limit.
Iterate through the items and weights to fill the array with optimal values.
Return the maximum value achievable at the given weight limit.
Round duration - 60 minutes
Round difficulty - Medium
The interview was focused on data structures as well as computer fundamentals along with puzzles.
You are given an unsorted array ARR
. Your task is to sort it so that it forms a wave-like array.
The first line contains an integer 'T', the number of test cases.
For ea...
Sort an array in wave form where each element is greater than or equal to its adjacent elements.
Iterate through the array and swap adjacent elements to form a wave pattern.
Ensure that the first element is greater than or equal to the second element.
There can be multiple valid wave arrays, so any valid wave array is acceptable.
You are given a Singly Linked List of integers. Your task is to reverse the Linked List by changing the links between nodes.
The first line of input contai...
Reverse a given singly linked list by changing the links between nodes.
Iterate through the linked list and reverse the links between nodes
Use three pointers to keep track of the current, previous, and next nodes
Update the links between nodes to reverse the list
Return the head of the reversed linked list
Round duration - 90 minutes
Round difficulty - Easy
The Round was mainly focused on resume+ dsa + system design +computer fundamentals
Given a stream of integers, calculate and print the median after each new integer is added to the stream.
Output only the integer part of the median.
N = 5
Stre...
Calculate and print the median after each new integer is added to the stream.
Use a min heap to store the larger half of the numbers and a max heap to store the smaller half.
Keep the two heaps balanced by ensuring the size difference is at most 1.
If the total number of elements is odd, the median is the top of the larger heap. If even, average the tops of both heaps.
LRU cache in a database management system stores most recently used data and removes least recently used data when full.
LRU cache is implemented using a doubly linked list and a hash map.
Each node in the linked list represents a key-value pair.
When a key is accessed, it is moved to the front of the linked list.
If the cache is full, the least recently used node at the end of the list is removed.
Example: If cache size is...
Use two stacks - one to store actual values and one to store minimum values.
Use two stacks - one to store actual values and one to store minimum values
When pushing a new value, check if it is smaller than the current minimum and push it to the min stack if so
When popping a value, check if it is the current minimum and pop from min stack if so
getMin() operation can be done by peeking at the top of the min stack
Tip 1 : Properly grasp over basic concepts
Tip 2 : Prepare good for DS & Algo as most companies have a separate round for it.
Tip 3 : Don't lie over your resume
Tip 1 : Don't Lie over your resume
Tip 2 : Avoid unnecessary details like Hobbies, family details, declaration, date, signature, etc.
SOLID principles are a set of five design principles for writing maintainable and scalable code.
S - Single Responsibility Principle
O - Open/Closed Principle
L - Liskov Substitution Principle
I - Interface Segregation Principle
D - Dependency Inversion Principle
HashSet is a collection that stores unique elements by using a hash table.
Elements are stored based on their hash code
Uses hashCode() and equals() methods to check for duplicates
Does not maintain insertion order
Allows null values
Example: HashSet
3-5 Yrs
Not Disclosed
3-5 Yrs
Not Disclosed
Key Account Manager
7
salaries
| ₹4 L/yr - ₹8 L/yr |
Security Guard
6
salaries
| ₹1.4 L/yr - ₹2 L/yr |
Social Media Executive
5
salaries
| ₹4 L/yr - ₹4 L/yr |
HR Manager
5
salaries
| ₹17.4 L/yr - ₹22.2 L/yr |
Security Supervisor
5
salaries
| ₹1.5 L/yr - ₹3.2 L/yr |
Razorpay
Paytm
PhonePe
BillDesk