Filter interviews by
I applied via Campus Placement
Assignment based on UI design
Top trending discussions
I appeared for an interview in Aug 2017.
NP hardness refers to the difficulty of solving a problem in non-deterministic polynomial time.
NP-hard problems are some of the most difficult problems in computer science.
They cannot be solved in polynomial time by any known algorithm.
Examples include the traveling salesman problem and the knapsack problem.
A reference variable is a variable that holds the memory address of an object, while an actual reference is the object itself.
A reference variable is declared with a specific type and can only refer to objects of that type.
An actual reference is the object itself, which can be accessed and manipulated using the reference variable.
Changing the value of a reference variable does not affect the original object, but changi...
The 0-1 Knapsack problem involves maximizing value within a weight limit using items that can either be included or excluded.
Dynamic Programming approach is commonly used to solve this problem.
Each item has a weight and a value; you cannot take fractional items.
Example: If you have items with weights [1, 2, 3] and values [10, 15, 40], and a capacity of 6, the maximum value is 55.
The solution involves creating a table t...
When we type an URL, the browser sends a request to the server hosting the website and retrieves the corresponding webpage.
The browser parses the URL to extract the protocol, domain, and path.
It resolves the domain name to an IP address using DNS.
The browser establishes a TCP connection with the server.
It sends an HTTP request to the server.
The server processes the request and sends back an HTTP response.
The browser re...
Implementation of LRU cache using a doubly linked list and a hash map.
LRU (Least Recently Used) cache is a data structure that stores a fixed number of items and evicts the least recently used item when the cache is full.
To implement LRU cache, we can use a doubly linked list to maintain the order of items based on their usage frequency.
We can also use a hash map to store the key-value pairs for quick access and retrie...
Explaining page replacement algorithms like FIFO and LRU using a given page access sequence.
FIFO (First-In-First-Out): Replaces the oldest page in memory.
Example: Access sequence [1, 2, 3, 1, 2, 4] with 3 frames results in [1, 2, 4].
LRU (Least Recently Used): Replaces the page that hasn't been used for the longest time.
Example: Access sequence [1, 2, 3, 1, 2, 4] with 3 frames results in [2, 3, 4].
Optimal: Replaces the ...
Indexing in DBMS is a technique to improve query performance by creating a data structure that allows faster data retrieval.
Indexing is used to speed up data retrieval operations in a database.
It involves creating a separate data structure that maps the values of a specific column to their corresponding records.
This data structure is called an index.
Indexes are typically created on columns that are frequently used in s...
Given a list of process IDs and their corresponding parent process IDs, print the IDs of all processes that are children of a specific process ID, and recursively kill all their children.
Iterate through the list of process IDs and parent process IDs
Check if the current process ID is the one to be killed
If yes, recursively find and print all its children
If a child has further children, recursively kill them as well
It was a part of placement drive, 1st OA than interview. The OA round was super easy I was able to code in minutes.
I applied via LinkedIn and was interviewed in Jun 2022. There were 2 interview rounds.
A linked list is a linear data structure where elements are stored in nodes with each node pointing to the next node in the sequence.
Consists of nodes connected by pointers
Does not have a fixed size like arrays
Can easily insert or delete elements without shifting other elements
Examples: Singly linked list, Doubly linked list, Circular linked list
Sets in JavaScript are used to store unique values of any type.
Create a new set using the Set constructor
Add values to the set using the add() method
Check if a value exists in the set using the has() method
Remove a value from the set using the delete() method
Iterate over the set using the forEach() method
3 Coding question on hackerrank (graph leet code medium)
Find the final element in a rotated array.
Identify the pivot point where the array was rotated.
Determine if the target element is in the first or second half of the array.
Use binary search to find the target element.
Reorder a linked list in place.
Use two pointers to find the middle of the list
Reverse the second half of the list
Merge the two halves of the list
Finding the intersection point of two linked lists.
Traverse both lists and find their lengths
Move the head of the longer list by the difference in lengths
Traverse both lists simultaneously until they meet at the intersection point
Calculate the sum of all paths between two nodes in a binary tree.
Traverse the tree and keep track of the path and its sum from the root to the current node.
When the target nodes are found, calculate the sum of all paths between them by adding the path sums of their common ancestor.
Recursively traverse the left and right subtrees to find the target nodes.
Use a hash table to store the path sums of each node for efficien...
I applied via Referral and was interviewed in Jun 2023. There were 5 interview rounds.
2 questions of leetcode medium level
And also has to write the steps of the approaches
Dynamic programming problem involving arrays of strings.
Use dynamic programming to efficiently solve problems by breaking them down into smaller subproblems.
Consider using a 2D array to store intermediate results for optimal substructure.
Examples: Longest Common Subsequence, Word Break, Minimum Path Sum.
Binary Search Tree Traversal, 20 min, Leetcode
Caching is the process of storing frequently accessed data in a temporary storage to improve performance.
Caching improves performance by reducing the need to fetch data from the original source.
It involves storing data in a temporary storage, such as memory or disk, closer to the user or application.
Caching can be done at various levels, including browser caching, server-side caching, and database caching.
Examples of c...
POST requests are a type of HTTP request method used to submit data to a server.
POST requests are used to create or update resources on a server.
They are commonly used in web forms to submit user input data.
POST requests have a request body that contains the data being submitted.
They are different from GET requests, which are used to retrieve data from a server.
POST requests are more secure than GET requests because th...
I applied via Referral and was interviewed before Mar 2022. There were 4 interview rounds.
Leetcode medium problems
To find the middle of a linked list, use two pointers - one moving twice as fast as the other. To add two numbers, traverse both lists simultaneously and add corresponding digits.
Use two pointers to find the middle of the linked list - one moving twice as fast as the other
To add two numbers represented by linked lists, traverse both lists simultaneously and add corresponding digits
If the sum of two digits is greater th...
based on 1 interview experience
Business Analyst
5
salaries
| ₹1 L/yr - ₹8 L/yr |
Project Manager
4
salaries
| ₹5 L/yr - ₹8 L/yr |
Data Analyst
4
salaries
| ₹1.8 L/yr - ₹9.5 L/yr |
Performance Marketing Manager
4
salaries
| ₹8.5 L/yr - ₹12 L/yr |
Software Developer
3
salaries
| ₹9 L/yr - ₹12 L/yr |
TCS
Accenture
Wipro
Cognizant