i
Flipkart
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by
Clear (1)
Program to find the angle between the hands of a clock given the time.
Calculate the angle of the hour hand from 12 o'clock position
Calculate the angle of the minute hand from 12 o'clock position
Calculate the absolute difference between the two angles
If the difference is greater than 180 degrees, subtract it from 360 degrees
Return the absolute value of the difference as the angle between the hands
To find if two linked lists intersect, traverse both lists and compare their tail nodes.
Traverse both linked lists and find their lengths
If the lengths are different, move the longer list's head pointer to the difference in length
Now traverse both lists and compare their nodes until a common node is found
If no common node is found, the lists do not intersect
JOINS are used to combine rows from two or more tables based on a related column between them.
JOINS are used to retrieve data from multiple tables in a single query
There are different types of JOINS - INNER, LEFT, RIGHT, FULL OUTER
JOINS are based on a related column between the tables
Syntax: SELECT * FROM table1 JOIN table2 ON table1.column = table2.column
Combine 4 elements of a sorted array of size 7 and a sorted array of 3 elements to make a sorted array.
Insert the 3 elements of the smaller array into the larger array
Sort the larger array using any sorting algorithm
To check if a string is a palindrome, compare the first and last characters, then move towards the center.
Remove all non-alphanumeric characters and convert to lowercase
Use two pointers, one starting from the beginning and the other from the end
Compare the characters at both pointers, move towards the center until they meet
If all characters match, the string is a palindrome
Top trending discussions
I am currently working with Java and Selenium for test automation.
Using Java programming language for writing test scripts
Using Selenium WebDriver for automating web applications
Integrating with CI/CD tools like Jenkins for continuous testing
Working with frameworks like TestNG for test management
Using tools like Maven for project management
Find the maximum subsequent distinct and contiguous subarray in a character array.
Use a sliding window approach to iterate through the array.
Keep track of the distinct characters in the current subarray.
Update the maximum length and subarray as necessary.
Create a stack using 2 given queues.
Push elements into one queue until it is full.
When the first queue is full, push new elements into the second queue.
To pop an element, remove all elements from the non-empty queue except the last one.
Switch the non-empty queue to the other one when it becomes empty.
A test framework should have features like test case management, test data management, reporting, and integration with CI/CD tools.
Test case management: Ability to create, organize, and execute test cases.
Test data management: Ability to manage test data and generate test data sets.
Reporting: Ability to generate detailed test reports with metrics and logs.
Integration with CI/CD tools: Ability to integrate with tools li...
To check if each page of Amazon.com has its logo, we can use automated testing with Selenium WebDriver.
Use Selenium WebDriver to navigate to each page of Amazon.com
Locate the logo element on each page using its XPath or CSS selector
Verify that the logo element is displayed on each page
Yes, I have worked on automation frameworks.
I have experience in developing and maintaining automation frameworks using tools like Selenium, TestNG, and Cucumber.
I have also worked on customizing existing frameworks to meet specific project requirements.
I am familiar with both data-driven and keyword-driven frameworks.
I have integrated automation frameworks with CI/CD pipelines for continuous testing.
One example of a p...
When entering a URL and hitting enter, the browser performs DNS lookup, establishes a TCP connection, sends an HTTP request, receives the response, and renders the page.
Browser performs DNS lookup 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
Server processes the request and sends back an HTTP response
Browser receives the respon
Reverse every 3 nodes in a singly linked list using recursion.
Create a recursive method that takes the head of the linked list as input.
If the head is null or there are less than 3 nodes remaining, return the head.
Reverse the first 3 nodes by swapping their pointers.
Recursively call the method on the next 3 nodes and update the pointers accordingly.
Return the new head of the reversed linked list.
1. Time management 2. Public speaking 3. Learning new technologies
Struggling with time management, often missing deadlines
Nervous when speaking in front of large groups
Finding it challenging to keep up with the latest technologies in the field
I have worked on projects involving test automation, performance testing, and API testing. I am also interested in exploring new testing tools and techniques.
Test automation projects using Selenium and Cucumber
Performance testing using JMeter for load testing
API testing using Postman and RestAssured
Interest in exploring new testing tools and techniques
Snapdeal is a leading e-commerce platform in India, offering a wide range of products and services.
Snapdeal has a vast product catalog, providing customers with a wide variety of options.
The platform offers competitive prices and frequent discounts, making it attractive for customers.
Snapdeal has a user-friendly interface and a seamless shopping experience.
The company has a strong logistics network, ensuring timely del...
I applied via Company Website and was interviewed in Oct 2021. There were 3 interview rounds.
Find the first and last occurrence of a specific element in an array of strings.
Iterate through the array and keep track of the index of the first and last occurrence of the element.
Return the index of the first and last occurrence of the element.
I was interviewed before Sep 2020.
Round duration - 60 minutes
Round difficulty - Easy
Round duration - 50 minutes
Round difficulty - Easy
Round duration - 60 minutes
Round difficulty - Easy
At the beginning of this round, the interviewer asked me about the data structures I knew. Linked lists, trees, graphs, arrays etc. was my answer. He asked me how well I knew Dynamic Programming. I said I wasn’t strong in that and he said that he would ask me a question on dynamic programming for sure.
Round duration - 40 minutes
Round difficulty - Easy
The interviewer asked me if I was comfortable with the interview process so far and how the previous interviews were. I said it was good and he gave me the first problem to solve.
Round duration - 60 minutes
Round difficulty - Easy
The interviewer asked me some Computer Science fundamentals in this round as well as some behavioural questions.
Implement a Trie data structure with insert and search functions.
Create a TrieNode class with children and isEndOfWord attributes.
Implement insert function to add words by iterating through characters.
Implement search function to check if a word exists by traversing the Trie.
Example: Insert 'apple', 'banana', 'orange' and search for 'apple' and 'grape'.
Do lot of hard work and practice of Data Structures and Algorithms based questions. I personally recommend you Coding Ninjas and Geeks For Geeks for interview preparation.
Application resume tips for other job seekersMake your resume short and try to make it of one page only and do mention all your skills which you are confident of in your resume.
Final outcome of the interviewSelectedI was interviewed in Aug 2017.
Merge Sort is a divide and conquer algorithm that sorts an array by dividing it into two halves, sorting them separately, and then merging the sorted halves.
Divide the array into two halves
Recursively sort the two halves
Merge the sorted halves
Find pairs of integers in a BST whose sum is equal to a given number.
Traverse the BST and store the values in a hash set.
For each node, check if (X - node.value) exists in the hash set.
If yes, add the pair (node.value, X - node.value) to the result.
Continue traversal until all nodes are processed.
Merge overlapping time intervals into mutually exclusive intervals.
Sort the intervals based on their start time.
Iterate through the intervals and merge overlapping intervals.
Output the mutually exclusive intervals.
Example: [(1,3), (2,6), (8,10), (15,18)] -> [(1,6), (8,10), (15,18)]
Different types of hashing and alternative for Linear Chaining
Different types of hashing include division, multiplication, and universal hashing
Alternative for Linear Chaining is Open Addressing
Open Addressing includes Linear Probing, Quadratic Probing, and Double Hashing
An AVL tree is a self-balancing binary search tree where the heights of the left and right subtrees differ by at most one.
AVL tree is a binary search tree with additional balance factor for each node.
The balance factor is the difference between the heights of the left and right subtrees.
Insertion and deletion operations in AVL tree maintain the balance factor to ensure the tree remains balanced.
Rotations are performed ...
Find the minimum number of squares whose sum equals to a given number n.
Use dynamic programming to solve the problem efficiently.
Start with finding the square root of n and check if it is a perfect square.
If not, then try to find the minimum number of squares required for the remaining number.
Repeat the process until the remaining number becomes 0.
Return the minimum number of squares required for the given number n.
Insertion sort for a singly linked list.
Traverse the list and compare each node with the previous nodes
If the current node is smaller, swap it with the previous node
Repeat until the end of the list is reached
Time complexity is O(n^2)
I was interviewed before May 2021.
Round duration - 90 minutes
Round difficulty - Medium
Around 65-70 people sat for the test. 15 people were shortlisted. It consisted of the following to be done in 90 minutes.
- 28 MCQs based on core CS
- 2 Coding questions – everyone had different and random questions. Most questions were custom logic based (easy level) including some standard questions – LCS, LIS, topological sort.
Round duration - 60 minutes
Round difficulty - Easy
Interviewer was very friendly. It started with the standard – tell me about yourself / introduce yourself type of question. Then he proceeded and asked two coding questions
Your friend has homework to complete. Help him by removing duplicates from a sorted linked list.
You are given the 'Head' of a sorted linked list. Modify the l...
Remove duplicates from a sorted linked list without adjacent duplicates.
Traverse the linked list while comparing current and next nodes.
If they are equal, skip the next node by updating the current node's next pointer.
Repeat until the end of the list is reached.
You are enrolled as a student and must complete N
courses, numbered from 1 to N, to earn your degree.
Some courses have prerequisites, which means that to take course i
,...
Check if it is feasible to complete all courses with prerequisites.
Create a graph representing the prerequisites with courses as nodes and edges as prerequisites.
Perform a topological sort on the graph to check if there is a cycle (if there is, then it's not feasible to complete all courses).
If there is no cycle, then it is feasible to complete all courses.
Round duration - 60 minutes
Round difficulty - Medium
This round had only 1 question. The interviewer introduced himself. And he advised me to clearly understand the problem before proceeding.
You are given a binary tree of distinct integers, along with two nodes, ‘X’ and ‘Y’. Your task is to determine the Lowest Common Ancestor (LCA) of ‘X’ and ‘Y’.
The LC...
Find the Lowest Common Ancestor of two nodes in a binary tree.
Traverse the binary tree to find the paths from the root to nodes X and Y.
Compare the paths to find the last common node, which is the Lowest Common Ancestor.
Implement a recursive function to efficiently find the LCA.
Handle cases where one node is an ancestor of the other.
Consider edge cases like when X or Y is the root node.
Round duration - 60 minutes
Round difficulty - Medium
Pretty Good Round. Fast Paced. We covered a lot of ground.
Design and implement a class BSTIterator
to perform an in-order traversal over a Binary Search Tree (BST). Your implementation should include the following me...
Design and implement a class BSTIterator to perform in-order traversal over a Binary Search Tree (BST).
Implement a parameterized constructor to initialize the iterator with the root of the BST.
Implement a method 'next()' to return the next smallest element in in-order traversal.
Implement a method 'hasNext()' to check if there exists a next smallest element in traversal.
Ensure the output is the in-order traversal of the
Given a binary array 'ARR' of size 'N', your task is to determine the maximum length of a sequence consisting solely of 1’s that can be obtained by converting at...
Find the maximum length of a sequence of 1's by converting at most K zeroes into ones in a binary array.
Iterate through the array and keep track of the current window of 1's and zeroes.
Use a sliding window approach to find the maximum length of consecutive 1's by flipping at most K zeroes.
Update the window based on the number of zeroes flipped and keep track of the maximum length found so far.
Return the maximum length ...
You are given an undirected and disconnected graph G(V, E)
having V
vertices numbered from 0
to V-1
and E
edges. Your task is to print its BFS traversal starting from the 0t...
BFS traversal of an undirected and disconnected graph starting from vertex 0.
Start BFS traversal from vertex 0 and visit all connected nodes in sorted order.
Use a queue to keep track of nodes to visit next.
Keep a visited array to avoid revisiting nodes.
Print the BFS traversal path as the nodes are visited.
Example: For input V=5, E=4 and edges 0-1, 0-2, 1-3, 2-4, the BFS traversal will be [0, 1, 2, 3, 4].
Given an undirected graph with V
vertices (labeled 0, 1, ..., V-1) and E
edges, each edge connects two nodes X
and Y
with a specified weight representing the dis...
Dijkstra's algorithm is used to find the shortest path distance from a source node to all other nodes in an undirected graph.
Implement Dijkstra's algorithm to find the shortest path distance from node 0 to all other nodes in the graph.
Use a priority queue to efficiently select the next node with the shortest distance.
Initialize distances to all nodes as infinity, except for the source node which is 0.
Update distances t...
Round duration - 60 minutes
Round difficulty - Hard
Bar Raised Round. Definitely felt the difficulty.
You are given a string consisting of English alphabet characters. Your task is to identify and return the first character in the string that does not repeat...
Identify and return the first non-repeating character in a string, or the first character if all characters repeat.
Iterate through the string to count the frequency of each character
Iterate through the string again to find the first character with frequency 1
If no such character is found, return the first character of the string
Tip 1 : Practice at least 250 Questions, Give yourself enough time for preparation. Cramming won't take you very far. In books, I really liked Elements of Programming Interviews.
Tip 2 : Make sure to brush up your basics - coding style, OOPs, Language features. They help in making an impression.
Tip 3 : Don't worry about solving the question in the interview. Learn to tackle any random problem with the best of your ability. More often than not, that'd be enough.
Tip 1 : Keep your resume clean - no graphics, no multiple fonts. Keep it one page.
Tip 2 : Don't go over board in mentioning skills, only mention the things you are truly confident about.
Senior Executive
2.5k
salaries
| ₹0 L/yr - ₹0 L/yr |
Operations Executive
1.8k
salaries
| ₹0 L/yr - ₹0 L/yr |
Team Lead
1.8k
salaries
| ₹0 L/yr - ₹0 L/yr |
Assistant Manager
1.6k
salaries
| ₹0 L/yr - ₹0 L/yr |
Data Entry Operator
1.4k
salaries
| ₹0 L/yr - ₹0 L/yr |
Amazon
Myntra
Snapdeal
Meesho