Filter interviews by
Be the first one to contribute and help others!
I applied via Walk-in and was interviewed before Jul 2020. There were 3 interview rounds.
I appeared for an interview before Jan 2021.
Round duration - 60 Minutes
Round difficulty - Medium
The round was held on Google Meet and I was given 2 coding problems for which first I had to explain my approach and then I had to write code in Shared Google Docs and dry run on sample test cases and discuss Time and Space Complexity.
Given a binary tree with N
nodes, determine whether the tree is a Binary Search Tree (BST). If it is a BST, return true
; otherwise, return false
.
A binary search tree (BST)...
Validate if a given binary tree is a Binary Search Tree (BST) or not.
Check if the left subtree of a node contains only nodes with data less than the node's data.
Check if the right subtree of a node contains only nodes with data greater than the node's data.
Recursively check if both left and right subtrees are also binary search trees.
Given a binary tree with 'N' nodes, identify the path from a leaf node to the root node that has the maximum sum among all root-to-leaf paths.
All the possibl...
Find the path from a leaf node to the root node with the maximum sum in a binary tree.
Traverse the binary tree from leaf to root while keeping track of the sum of each path.
Compare the sums of all paths and return the path with the maximum sum.
Use recursion to traverse the tree efficiently and keep updating the maximum sum path.
Round duration - 60 Minutes
Round difficulty - Medium
This was also a Data Structures and Algorithms round where I was asked to solve 2 coding problems explaining my approach with proper Complexity Analysis . After the coding questions were over there was some time left so the interviewer asked me some concepts related to DBMS.
You are given a permutation of 'N' integers. A sequence of 'N' integers is considered a permutation if it includes all integers from 1 to 'N' exactly once. Your task is ...
The task is to rearrange a given permutation of 'N' integers to form the lexicographically next greater permutation.
Iterate from right to left to find the first element that is smaller than the element to its right.
Swap this element with the smallest element to its right that is greater than it.
Reverse the elements to the right of the swapped element to get the lexicographically next greater permutation.
You are given a binary tree with 'N' nodes. Your task is to determine the size of the largest subtree within the binary tree which is also a Binary Search Tree (BST).
...Find the size of the largest subtree in a binary tree that is also a Binary Search Tree.
Traverse the tree in a bottom-up manner to check if each subtree is a BST.
Keep track of the size of the largest BST subtree encountered so far.
Use recursion to solve this problem efficiently.
Example: For the input 1 2 3 4 -1 5 6 -1 7 -1 -1 -1 -1 -1 -1, the largest BST subtree has a size of 3.
Indexing in databases is a technique used to improve the speed of data retrieval by creating a data structure that allows for quick lookups.
Indexes are created on columns in a database table to speed up the retrieval of rows that match a certain condition.
Types of indexes include B-tree, hash, and bitmap indexes.
Indexes can improve the performance of SELECT queries but may slow down INSERT, UPDATE, and DELETE operation...
Round duration - 50 Minutes
Round difficulty - Medium
This round also had 2 questions related to DS and Algo . One was from graphs and the other was an implementation of a LRU Cache . There were 2 interviewers and both of them were quite friendly and helpful. Overall, this round went well.
You are provided with a directed graph composed of 'N' nodes. You have a matrix called 'EDGES' with dimensions M x 2, which specifies the 'M' edges in the graph. Each edge...
Detect cycle in a directed graph using depth-first search (DFS) algorithm.
Use DFS to traverse the graph and detect back edges (edges that point to an ancestor node).
Maintain a visited array to keep track of visited nodes and a recursion stack to keep track of nodes in the current path.
If a back edge is found during traversal, a cycle exists in the graph.
Return true if a cycle is detected, false otherwise.
Design a data structure for a Least Recently Used (LRU) cache that supports the following operations:
1. get(key)
- Return the value of the key if it exists in the cache; otherw...
Design a Least Recently Used (LRU) cache data structure that supports get and put operations with capacity constraint.
Use a combination of hashmap and doubly linked list to efficiently implement the LRU cache.
Keep track of the least recently used item and update it accordingly when inserting new items.
Ensure to handle the capacity constraint by evicting the least recently used item when the cache is full.
Implement get(...
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
I applied via Recruitment Consultant and was interviewed before Sep 2020. There was 1 interview round.
I appeared for an interview before Dec 2020.
Round duration - 90 minutes
Round difficulty - Hard
This was an online coding round where we were supposed to solve 2 questions under 90 minutes . Both the questions in my set were related to Graphs and were quite tricky and heavy to implement.
Given a directed graph with a specified number of vertices V
and edges E
, your task is to calculate the total number of distinct paths from a given source node S
to all ot...
Calculate the total number of distinct paths from a given source node to all other nodes in a directed graph.
Use dynamic programming to keep track of the number of paths from the source node to each node in the graph.
Consider using modular arithmetic to handle large numbers and prevent overflow.
Start by initializing the number of paths from the source node to itself as 1.
Iterate through the edges of the graph and updat...
You are provided with a number of courses 'N', some of which have prerequisites. There is a matrix named 'PREREQUISITES' of size 'M' x 2. This matrix indicates that fo...
Given courses with prerequisites, determine a valid order to complete all courses.
Use topological sorting to find a valid order of courses.
Create a graph with courses as nodes and prerequisites as edges.
Start with courses that have no prerequisites and remove them from the graph.
Continue this process until all courses are taken or there are no valid courses left.
If there is a cycle in the graph, it is impossible to com
Round duration - 60 Minutes
Round difficulty - Medium
This was a Data Structures and Algorithms round with some standard questions . I was expected to come up with an
efficient approach and code it as well .
You are provided with 'N' intervals, each containing two integers denoting the start time and end time of the interval.
Your task is to merge all overlapping intervals a...
Merge overlapping intervals and return sorted list of merged intervals.
Sort the intervals based on start times.
Iterate through intervals and merge overlapping intervals.
Return the merged intervals in sorted order.
Given a 2-dimensional binary matrix called Mat
of size N x M that consists solely of 0s and 1s, find the length of the longest path from a specified source cell to a destina...
Find the length of the longest path from a source cell to a destination cell in a binary matrix.
Use depth-first search (DFS) to explore all possible paths from source to destination.
Keep track of visited cells to avoid revisiting them.
Return the length of the longest path found, or -1 if no path exists.
Round duration - 50 Minutes
Round difficulty - Medium
This was also a DSA round where I was asked to code only one of the questions but I eventually ended up coding both
as I had some spare time and explained my approches very smoothly to the interviewer . This round went preety well .
Given an array of integers with 'N' elements, determine the length of the longest subsequence where each element is greater than the previous element. This...
Find the length of the longest strictly increasing subsequence in an array of integers.
Use dynamic programming to solve this problem efficiently.
Initialize an array to store the length of the longest increasing subsequence ending at each index.
Iterate through the array and update the length of the longest increasing subsequence for each element.
Return the maximum value in the array as the result.
Given a rotated sorted array ARR
of size 'N' and an integer 'K', determine the index at which 'K' is present in the array.
1. If 'K' is not present...
Given a rotated sorted array, find the index of a given integer 'K'.
Use binary search to find the pivot point where the array is rotated.
Then perform binary search on the appropriate half of the array to find 'K'.
Handle cases where 'K' is not present in the array by returning -1.
Round duration - 50 Minutes
Round difficulty - Medium
This was also a DSA round with 2 questions of Medium to Hard difficulty . I was expected to follow some clean code and OOPS principles to write the code in this round .
Given an array of integers ARR
and an integer K
, determine the rank of the element ARR[K]
.
The rank of any element in ARR
is defined as the number of elem...
Given an array and an index, find the number of elements smaller than the element at that index appearing before it in the array.
Iterate through the array up to index K and count the number of elements smaller than ARR[K].
Return the count as the rank of ARR[K].
Handle edge cases like empty array or invalid index K.
Design a data structure for a Least Recently Used (LRU) cache that supports the following operations:
1. get(key)
- Return the value of the key if it exists in the cache; otherw...
Design a Least Recently Used (LRU) cache data structure that supports get and put operations with capacity constraint.
Implement a doubly linked list to maintain the order of recently used keys.
Use a hashmap to store key-value pairs for quick access.
Update the order of keys in the linked list on get and put operations.
Evict the least recently used key when the cache reaches its capacity.
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
I applied via Referral and was interviewed before Sep 2020. There was 1 interview round.
I applied via Referral and was interviewed before Nov 2020. There was 1 interview round.
I applied via Company Website and was interviewed in May 2019. There were 5 interview rounds.
I appeared for an interview before Dec 2020.
Round duration - 60 Minutes
Round difficulty - Medium
This round was purely based on Data Structures and Algorithms . One has to be fairly comfortable in solving Algorithmic problems to pass this round . Both the questions asked were quite common and luckily I had already prepared them from CodeStudio and LeetCode.
Given a Binary Tree with 'N' nodes, where each node holds an integer value, your task is to compute the In-Order, Pre-Order, and Post-Order traversals of the binar...
Compute the In-Order, Pre-Order, and Post-Order traversals of a Binary Tree given in level-order format.
Implement functions to perform In-Order, Pre-Order, and Post-Order traversals of a Binary Tree.
Use level-order input to construct the Binary Tree.
Traverse the Binary Tree recursively to generate the required traversals.
Ensure proper handling of null nodes represented by -1 in the input.
Return the three traversals as
Given a Singly Linked List of integers, your task is to reverse the Linked List by altering the links between the nodes.
The first line of input is an intege...
Reverse a singly linked list by altering the links between nodes.
Iterate through the linked list and reverse the links between nodes
Use three pointers to keep track of the current, previous, and next nodes
Update the links between nodes to reverse the list
Return the head of the reversed linked list
Round duration - 45 Minutes
Round difficulty - Medium
This round basically tested some concepts from Data Structures and File Manipulation .
Given two arrays A
and B
with sizes N
and M
respectively, both sorted in non-decreasing order, determine their intersection.
The intersection of two arrays in...
The problem involves finding the intersection of two sorted arrays efficiently.
Use two pointers to iterate through both arrays simultaneously.
Compare elements at the pointers and move the pointers accordingly.
Handle cases where elements are equal and update the intersection array.
Return the intersection array as the result.
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
posted on 6 Dec 2015
Find the second largest prime number and its index from an array of positive integers.
Iterate through the array and check if each number is prime
Store the largest and second largest prime numbers found so far
Also store their indices
Return the second largest prime number and its index
Find the first missing positive number in an array of positive and negative integers.
Sort the array in ascending order
Iterate through the sorted array and find the first positive number that is missing
If no positive number is missing, return the next positive number after the largest positive number in the array
The data structure to program a jigsaw puzzle program would be a graph.
Use a graph data structure to represent the puzzle pieces and their connections.
Each puzzle piece can be represented as a node in the graph.
Edges between nodes represent the connections between puzzle pieces.
To solve the puzzle, use graph traversal algorithms like depth-first search or breadth-first search.
Apply puzzle-solving strategies like findin
Times Internet Limited (TIL) is a digital products company that operates various online platforms and services.
TIL is a subsidiary of Bennett Coleman & Co. Ltd (BCCL), which is India's largest media conglomerate.
TIL operates popular websites and apps like Times of India, Economic Times, Gaana, MX Player, and Cricbuzz.
TIL focuses on digital content, e-commerce, and technology solutions.
TIL has a diverse portfolio of...
I transitioned to software development due to my passion for coding and problem-solving.
I discovered my interest in coding during my civil engineering studies
I took online courses and attended coding bootcamps to learn software development skills
I completed projects and internships in software development to gain practical experience
I enjoy the creativity and problem-solving aspects of software development
The average speed can be calculated by taking the harmonic mean of the two speeds.
To calculate the harmonic mean, divide the sum of the speeds by the reciprocal of the sum of their reciprocals.
In this case, the harmonic mean can be calculated as 2/(1/20 + 1/30) = 24 km/h.
The minimum number of steps to find the defective ball is 2.
Divide the 8 balls into 3 groups of 3, 3, and 2 balls.
Compare the weights of the two groups of 3 balls.
If one group is heavier, divide it into 2 balls and compare their weights.
If the two balls have different weights, the heavier ball is the defective one.
If the two balls have the same weight, the remaining ball in the first group of 3 is the defective one.
Polymorphism is the ability of an object to take on many forms. It allows objects of different classes to be treated as the same type.
Polymorphism is achieved through method overriding and method overloading.
Method overriding allows a subclass to provide a specific implementation of a method that is already defined in its superclass.
Method overloading allows multiple methods with the same name but different parameters ...
Operator overloading is the ability to redefine operators for custom classes.
Allows operators to be used with custom classes
Example: '+' operator can be used to concatenate strings
Can improve readability and simplify code
Method overloading is having multiple methods with the same name but different parameters. Method overriding is having a method in a subclass with the same name, return type, and parameters as a method in its superclass.
Method overloading is achieved within the same class.
Method overriding occurs in a subclass that inherits from a superclass.
Method overloading is determined at compile-time based on the number, type, an...
I appeared for an interview before Jan 2021.
Round duration - 90 minutes
Round difficulty - Easy
The test was of moderate level, the coding question was easy if all the boundary questions were properly considered.
You are given a positive integer n
. Your task is to identify the largest prime factor of this given positive integer.
If there is no prime factor for a given intege...
Identify the largest prime factor of a given positive integer.
Iterate from 2 to sqrt(n) to find prime factors
Check if each factor is prime and update largest prime factor
If no prime factor found, output -1
You are provided with an integer array ARR
of length 'N'. Your objective is to determine the first missing positive integer using linear time and constant space. T...
Find the smallest positive integer missing from an array of integers.
Iterate through the array and mark positive integers as visited using index as a reference.
After marking, iterate again to find the first unmarked index which represents the missing positive integer.
Handle edge cases like duplicates and negative numbers appropriately.
Example: For input [3, 4, -1, 1], the output should be 2.
Round duration - 60 minutes
Round difficulty - Easy
The interviewer was friendly and he was interested in the implementation first and then the code.
Tips: Be thorough with various implementations and why they are in practice. Try to know the logic behind each implementation.
You are provided with a binary array, i.e., an array containing only 0s and 1s. Your task is to sort this binary array and return it after sorting.
The fir...
Yes, the binary array can be sorted in linear time and constant space using a single traversal.
Use two pointers approach to swap 0s to the left and 1s to the right.
Maintain two pointers, one for 0s and one for 1s, and iterate through the array once.
Example: Input array [1, 0, 1, 0, 1] will be sorted to [0, 0, 1, 1, 1] in a single traversal.
Polymorphism in OOP allows objects of different classes to be treated as objects of a common superclass.
Polymorphism allows for flexibility and reusability in code.
It enables a single interface to be used for different data types.
Examples include method overriding and method overloading.
Operator overloading is the ability to redefine the behavior of operators for user-defined data types.
Allows operators to be used with custom data types
Can define custom behavior for operators like +, -, *, etc.
Helps make code more readable and intuitive
Example: Overloading the + operator for a custom Vector class to add two vectors
Method overloading is having multiple methods in the same class with the same name but different parameters. Method overriding is having a method in a subclass with the same name and parameters as a method in its superclass.
Method overloading involves multiple methods with the same name but different parameters.
Method overriding involves a subclass redefining a method from its superclass with the same name and paramete...
Round duration - 45 minutes
Round difficulty - Easy
The interviewer was looking for a person interested in problem solving. He was looking forward for loud thinking.
Tips: If you don't know any answer, don't lose your cool. It is never necessary to answer all the questions in an interview. Be confident and think loud, so that if you are going the wrong way, the interviewer can assist you.
Round duration - 30 minutes
Round difficulty - Easy
This was the last round and just for formality. The interviewers were looking for a person who would fit in their working culture.
Tips: Be confident and always have a smile on your face. If you are selected for the HR interview, then there is a 90% chance that you would be selected.
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
based on 2 reviews
Rating in categories
Merchandiser
3
salaries
| ₹3 L/yr - ₹3.5 L/yr |
Senior Marketing Manager
3
salaries
| ₹7 L/yr - ₹8.4 L/yr |
Amazon
Flipkart
BigBasket
JustDial