Filter interviews by
Design classes for educational institutions in a city
Identify the main entities: schools, students, teachers, courses
Create a School class with attributes like name, address, and a list of students and teachers
Create a Student class with attributes like name, age, and a list of courses
Create a Teacher class with attributes like name, specialization, and a list of courses
Create a Course class with attributes like n...
Hashing is a process of converting data into a fixed-size numerical value called a hash code.
Hashing is used to quickly retrieve data from large datasets.
It is commonly used in data structures like hash tables and hash maps.
Hash functions should be fast, deterministic, and produce unique hash codes for different inputs.
Examples of hash functions include MD5, SHA-1, and SHA-256.
Finding optimal path cost and path in a matrix using dynamic programming.
Dynamic programming is a technique to solve problems by breaking them down into smaller subproblems and solving them recursively.
In this case, we can use dynamic programming to find the optimal path cost and path in a matrix.
We can start by defining a 2D array to store the minimum cost of reaching each cell in the matrix.
Then, we can use a re...
You are given an array/list of length 'N'. Each element of the array/list represents the length of a board. There are 'K' painters available to paint these boards. Each unit of ...
Find the minimum time required for 'K' painters to paint 'N' boards with given lengths.
Use binary search to find the minimum and maximum possible time to paint all boards.
Iterate through the possible time range and check if it is feasible to paint all boards within that time.
Keep track of the number of painters used and update the time range accordingly.
What people are saying about PayPal
Given a singly linked list of integers, return the head of the reversed linked list.
Initial linked list: 1 -> 2 -> 3 -> 4 -> NULL
Reversed linke...
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 instead of the next node.
Keep track of the previous, current, and next nodes while reversing the linked list.
Update the head of the reversed linked list as the last node encountered during reversal.
Determine if a given directed graph contains a cycle. Return true
if at least one cycle is found, otherwise return false
.
T
The first line consists of the intege...
Detect if a directed graph contains a cycle.
Use depth-first search (DFS) to detect cycles in the graph.
Maintain a visited array to keep track of visited vertices.
If a vertex is visited again during DFS and it is not the parent of the current vertex, then a cycle exists.
Return true if a cycle is found, false otherwise.
You are given ‘N’ fences. Your task is to compute the total number of ways to paint these fences using only 2 colors, such that no more than 2 adjacent fences have the sam...
The task is to compute the total number of ways to paint 'N' fences using 2 colors, such that no more than 2 adjacent fences have the same color.
Use dynamic programming to solve the problem efficiently.
Consider two cases: when the last two fences have the same color and when they have different colors.
Implement a solution that calculates the number of ways to paint 'N' fences modulo 10^9 + 7.
For N = 2, there are 4...
Given an undirected graph with ‘V’ vertices (labeled 0, 1, ... , V-1) and ‘E’ edges, where each edge has a weight representing the distance between two connected nodes (X, ...
Dijkstra's algorithm is used to find the shortest path from a source node to all other nodes in a graph with weighted edges.
Implement Dijkstra's algorithm to find the shortest path distances from the source node to all other nodes.
Use a priority queue to efficiently select the next node with the shortest distance.
Update the distances of neighboring nodes based on the current node's distance and edge weights.
Handle...
Given a Singly Linked List of integers that are sorted based on their absolute values, the task is to sort the linked list based on the actual values.
The absolute ...
Sort a Singly Linked List based on actual values instead of absolute values.
Traverse the linked list and store the values in an array.
Sort the array based on actual values.
Update the linked list with the sorted values.
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, 8...
Find the Kth largest element in an array of distinct positive integers.
Sort the array in non-increasing order to easily find the Kth largest element.
Ensure all elements in the array are distinct for accurate results.
Handle multiple test cases efficiently by iterating through each case.
I applied via Recruitment Consulltant and was interviewed in Jun 2024. There were 3 interview rounds.
Encryption of code involves converting plaintext into ciphertext to secure data.
Choose a strong encryption algorithm like AES or RSA
Generate a key for encryption
Encrypt the plaintext using the key and algorithm
Store or transmit the ciphertext securely
Abstraction is hiding the implementation details, function overriding is providing a new implementation for a method in a subclass.
Abstraction involves hiding the complex implementation details and showing only the necessary features to the user.
Function overriding occurs in inheritance when a subclass provides a specific implementation for a method that is already defined in its superclass.
Example: Parent class 'Anima...
I appeared for an interview in Mar 2025, where I was asked the following questions.
The problem involves counting the number of valid parentheses combinations in a string.
Use a stack to track opening parentheses and ensure they are matched with closing ones.
Count valid pairs as you traverse the string, e.g., '()' is valid, while '(()' is not.
Consider edge cases like empty strings or strings with no parentheses.
A React component can interact with the window object for various functionalities like resizing, scrolling, and event handling.
Use `window.addEventListener` to listen for events like resize or scroll.
Example: `window.addEventListener('resize', handleResize);`
Clean up event listeners in `componentWillUnmount` to prevent memory leaks.
Access window properties like `window.innerWidth` for responsive designs.
Use `window.loc...
Good Experience with friendly interviewer
Hackerrank - 1.5 hour
Design a system for managing a parking lot efficiently.
Use a database to store information about available parking spots, vehicles, and payments.
Implement a system for tracking entry and exit of vehicles.
Include features like online booking, payment options, and real-time availability updates.
Consider implementing a ticketing system for managing parking duration and fees.
Leetcode medium level qustion
I applied via Instahyre and was interviewed before Aug 2022. There were 5 interview rounds.
There 2 coding rounds one on online and other on one-one discussion, both including few problem solving on DS and Algo on topics of Trees, Priority Queue, Arrays, DFS
Implement a stack that supports retrieving the minimum element in constant time.
Use an auxiliary stack to keep track of minimum values.
Push the current minimum onto the auxiliary stack whenever a new element is pushed.
When popping an element, also pop from the auxiliary stack if it is the current minimum.
Example: For stack [3, 5, 2], min stack would be [3, 2].
To get min: simply return the top of the min stack.
Check if a given file path exists in the file system hierarchy and return the result.
Use file system APIs to check if the given file path exists in the hierarchy.
Traverse the file system hierarchy starting from the root directory to find the given file path.
Return true if the file path exists, false otherwise.
Design a parking system to manage vehicle parking efficiently and optimize space usage.
Define user roles: Admin, Driver, and Parking Attendant.
Implement features like real-time availability tracking and reservation.
Use sensors or cameras for automated entry/exit logging.
Integrate payment systems for seamless transactions.
Consider mobile app for users to find and reserve spots.
I appeared for an interview before Mar 2023.
This was back in 2015 so the coding test was very easy: it involved swapping of some numbers
I applied via Campus Placement and was interviewed in Jan 2022. There were 4 interview rounds.
2 coding question
Leetcode medium
Finding optimal path cost and path in a matrix using dynamic programming.
Dynamic programming is a technique to solve problems by breaking them down into smaller subproblems and solving them recursively.
In this case, we can use dynamic programming to find the optimal path cost and path in a matrix.
We can start by defining a 2D array to store the minimum cost of reaching each cell in the matrix.
Then, we can use a recursi...
In 2 years, I see myself as a senior software engineer, leading a team and contributing to the company's growth. I want to join the company because of its reputation for innovation and its focus on employee development.
I plan to continue learning and growing my skills in software development
I hope to take on more leadership responsibilities and mentor junior engineers
I want to contribute to the company's success by dev...
based on 13 interview experiences
Difficulty level
Duration
based on 29 reviews
Rating in categories
Software Engineer2
345
salaries
| ₹22.2 L/yr - ₹40 L/yr |
Software Engineer
338
salaries
| ₹19.2 L/yr - ₹40 L/yr |
Senior Software Engineer
298
salaries
| ₹24 L/yr - ₹42 L/yr |
Software Engineer III
283
salaries
| ₹30 L/yr - ₹51.2 L/yr |
Data Scientist
273
salaries
| ₹28 L/yr - ₹50 L/yr |
Paytm
Razorpay
Visa
MasterCard