Filter interviews by
I applied via Campus Placement
Assignment based on UI design
I appeared for an interview in Aug 2017.
N queen problem is to place N queens on an NxN chessboard without any two queens threatening each other.
The problem can be solved using backtracking algorithm
Start with placing a queen in the first row and move to the next row
If no safe position is found, backtrack to the previous row and try a different position
Repeat until all queens are placed or no safe position is found
Code can be written in any programming langua...
Check if there exists any sub array with given sum in the array with O(1K) space complexity.
Use two pointers to traverse the array and maintain a current sum.
If the current sum is greater than the given sum, move the left pointer.
If the current sum is less than the given sum, move the right pointer.
If the current sum is equal to the given sum, return true.
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.
References and pointers are both used to access memory locations, but references cannot be null and cannot be reassigned.
Pointers can be null and can be reassigned to point to different memory locations.
References are automatically dereferenced, while pointers need to be explicitly dereferenced.
Pointers can perform arithmetic operations, while references cannot.
Example: int x = 5; int *ptr = &x; int &ref = x;
Example: i
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...
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...
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...
B trees and B+ trees are data structures used for efficient storage and retrieval of data in databases.
B trees are balanced trees with a variable number of child nodes per parent node. They are commonly used in databases to store large amounts of data.
B+ trees are a variant of B trees where all data is stored in the leaf nodes, and the internal nodes only contain keys. They are commonly used in databases for indexing.
B...
AVL trees are self-balancing binary search trees. They maintain a balance factor to ensure height balance.
AVL trees are named after their inventors, Adelson-Velsky and Landis.
They are height-balanced, meaning the difference in height between left and right subtrees is at most 1.
Insertion and deletion operations may cause imbalance, which is corrected by rotations.
AVL trees have a worst-case time complexity of O(log n) ...
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
Was good and you get questions from various topics.
Apti
Basics of cs
1. Question on Graph LC-Hard 2. Question on BFS LC-Medium
Find missing number in array without extra space
Iterate through the array and XOR all the elements with their indices and the actual numbers
The missing number will be the XOR result
Example: ['1', '2', '4', '5'] -> XOR(0, 1) ^ XOR(1, 2) ^ XOR(2, 4) ^ XOR(3, 5) = 3
Implementing Heap data structure in C++
Use an array to represent the binary tree structure of the heap
Implement functions for inserting elements, deleting elements, and heapifying the array
Ensure that the heap property is maintained (parent node is always greater than or equal to its children)
LRU Cache is a data structure that stores a fixed number of items and removes the least recently used item when the cache is full.
Use a combination of a doubly linked list and a hashmap to efficiently implement LRU Cache.
Keep track of the least recently used item at the tail of the linked list.
When an item is accessed, move it to the head of the linked list to mark it as the most recently used item.
When adding a new it...
I applied via Referral and was interviewed in Sep 2024. There were 2 interview rounds.
Ppt and discussion - on all things in the company
Leetcode - 2 medium, 1 hard
Per question time good amoubnt of questions
I applied via Referral and was interviewed in Apr 2021. There were 4 interview rounds.
2 variable variation of LIS
The problem involves finding the longest increasing subsequence in two arrays
Dynamic programming can be used to solve the problem
The time complexity of the solution is O(n^2)
Example: Given two arrays [1, 3, 5, 4] and [2, 4, 3, 5], the longest increasing subsequence is [3, 5]
Example: Given two arrays [10, 22, 9, 33, 21, 50, 41, 60] and [5, 24, 39, 60, 15, 28, 27, 40], the longest increasing su
Search for an element in a rotated sorted array.
Use binary search to find the pivot point where the array is rotated.
Compare the target element with the first element of the array to determine which half to search.
Perform binary search on the selected half to find the target element.
Time complexity: O(log n), Space complexity: O(1).
Find the first non-repeating character in a continuous character stream.
Use a hash table to keep track of character frequency.
Iterate through the stream and check if the current character has a frequency of 1.
If yes, return the character as the first non-repeating character.
If no non-repeating character is found, return null or a default value.
I applied via Campus Placement and was interviewed in May 2021. There was 1 interview round.
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
I applied via Campus Placement and was interviewed in Jul 2022. There was 1 interview round.
Given a node in a family tree, print all nodes on the same level.
Traverse the tree level by level using BFS
Keep track of the level of each node while traversing
Print all nodes with the same level as the given node
Example: If the given node is 'John', print all his siblings and cousins
based on 1 interview
Interview experience
Business Analyst
4
salaries
| ₹3 L/yr - ₹8 L/yr |
Project Manager
4
salaries
| ₹4 L/yr - ₹8 L/yr |
Associate Project Manager
4
salaries
| ₹2 L/yr - ₹7 L/yr |
Performance Marketing Manager
4
salaries
| ₹8.5 L/yr - ₹12 L/yr |
Associate Product Manager
3
salaries
| ₹1 L/yr - ₹8 L/yr |
GrowthEnabler
Growth Hub
Growthworkz India
Growth Catalyst