Filter interviews by
I applied via Campus Placement and was interviewed in Jun 2022. There were 4 interview rounds.
Basic coding test on DSA on hirepro 90 mins total , choice of your own language. Easy to midium level questions
Swapping numbers without temporary variables or pointers.
Use addition and subtraction to swap values
For example, a = a + b; b = a - b; a = a - b;
Another method is to use XOR bitwise operator
For example, a = a ^ b; b = a ^ b; a = a ^ b;
Bubble sort has a time complexity of O(n^2)
Bubble sort compares adjacent elements and swaps them if they are in the wrong order
It repeats this process until the array is sorted
It has a worst-case time complexity of O(n^2) and a best-case time complexity of O(n)
It is not efficient for large datasets
I want to join Amdocs for its innovative culture, commitment to technology, and opportunities for professional growth in the telecom sector.
Innovative Culture: Amdocs is known for fostering creativity and innovation, which aligns with my passion for developing cutting-edge solutions.
Commitment to Technology: Amdocs invests heavily in new technologies, such as AI and cloud computing, allowing me to work on the latest ad...
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
I applied via Company Website and was interviewed before Nov 2021. There were 3 interview rounds.
General Leet Code Question and it was easy
General coding question which was from difficult
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
I applied via LinkedIn and was interviewed in Jul 2022. There were 2 interview rounds.
I applied via Campus Placement and was interviewed before Aug 2021. There were 2 interview rounds.
2 coding questions were asked, 1 invloves sorting and manipulation and the other one was trees question.
Connect n ropes with minimum cost using priority queue
Create a priority queue and insert all the ropes into it
Pop the two smallest ropes from the queue and connect them
Insert the new rope into the queue and repeat until only one rope remains
The cost of connecting two ropes is the sum of their lengths
Time complexity: O(nlogn)
Example: Ropes of lengths 4, 3, 2, and 6 can be connected with a cost of 29
The height of the tree can be found by counting the number of edges from the root to the farthest leaf node.
Count the number of edges from the root to the farthest leaf node
This will give the height of the tree
Example: If the farthest leaf node is 4 edges away from the root, the height of the tree is 4
I applied via LinkedIn and was interviewed in Jun 2022. There were 2 interview rounds.
I applied via Campus Placement and was interviewed in Oct 2022. There were 4 interview rounds.
Machine learning, SQL, data structure
Privious problem with logical understanding , always participate in discussion with valid and clear points.
Random Forest is a machine learning algorithm that builds multiple decision trees and combines their outputs.
Random Forest is an ensemble learning method.
It builds multiple decision trees and combines their outputs to make a final prediction.
It is used for both classification and regression tasks.
It is less prone to overfitting compared to a single decision tree.
It can handle missing values and outliers.
Example: predic...
String attachment algorithm joins two strings together.
Create a new string variable to hold the result
Loop through the first string and add each character to the new string
Loop through the second string and add each character to the new string
Return the new string
Dynamic Programing, string manipulation
Largest common ancestor is the most recent node that is a common ancestor of two or more nodes in a tree.
It is commonly used in computer science and genealogy.
In genealogy, it refers to the most recent common ancestor of two or more individuals.
In computer science, it is used in algorithms for finding the lowest common ancestor of two nodes in a tree.
It can be found using various algorithms such as Tarjan's off-line le...
Rain water trapping problem refers to the accumulation of rainwater in low-lying areas or on flat roofs.
The problem can be solved by installing rainwater harvesting systems.
Proper drainage systems can also prevent rainwater trapping.
Green roofs and permeable pavements can help absorb rainwater.
Rain gardens can be created to collect and filter rainwater.
Regular maintenance of gutters and downspouts can prevent clogging ...
TCS
Accenture
Wipro
Cognizant