Filter interviews by
Clear (1)
I applied via Referral and was interviewed before Jan 2024. There were 3 interview rounds.
JavaScript concepts like event loop, variable hoisting, and closures are fundamental for understanding the language.
Event loop is responsible for managing the execution of code in JavaScript, ensuring non-blocking behavior.
Variable hoisting allows variables to be declared anywhere in a function, with their declarations moved to the top during compilation.
Closures allow functions to access variables from their outer sco...
Experience with Redux for state management and data flow
Used Redux for managing state in complex web applications
Understand concepts like actions, reducers, and store in Redux
Data flows in a unidirectional manner within Redux, with actions triggering state changes through reducers
Example: Dispatching an action to update a user's profile information in Redux store
Optimizing React application performance through various strategies.
Code splitting to reduce initial load time
Using shouldComponentUpdate or React.memo for efficient rendering
Implementing virtualized lists for large data sets
Minifying and compressing assets for faster loading
Caching data with tools like Redux or useMemo
Implement a function to reverse a string in place
Create two pointers, one at the start of the string and one at the end
Swap characters at the two pointers and move them towards the center until they meet
Implement field validation in a form using code assignment
Use HTML form elements like input, select, textarea
Use JavaScript to validate user input
Display error messages if validation fails
Consider using libraries like jQuery Validation for complex validations
Code assignment to fetch data from API & DOM manipulation using state management libraries
Use fetch API to make a request to the desired endpoint
Utilize state management libraries like Redux or MobX for managing data
Update the DOM based on the fetched data using the state management library
The manager inquired about previous projects and a data structures and algorithms question, during which I explained my roles and responsibilities.
I was interviewed before Jan 2021.
Round duration - 60 minutes
Round difficulty - Easy
Two coding questions were given in the first round to be solved in 60 minutes.
Given an array A
containing 'N' integers and an integer m
, rearrange the elements of the array such that the differences between the array elements and m
are sor...
Rearrange array elements based on their differences from a given integer.
Calculate the differences between each element and the given integer.
Sort the elements based on their differences while maintaining the original order for elements with the same difference.
Implement a function to rearrange the array elements as per the given criteria.
Given an arbitrary binary tree, a node of the tree, and an integer 'K', find all nodes that are at a distance K from the specified node, and return a list of th...
The task is to find all nodes in a binary tree that are at a distance K from a given node.
Traverse the binary tree to find the given node
From the given node, perform a depth-first search to find all nodes at distance K
Use a list to store the values of the nodes at distance K
Return the list of values in any order
Round duration - 60 minutes
Round difficulty - Easy
This was a technical round with questions based on DSA, DBMS, Computer Networking and project based questions.
Ninja is tasked with printing a triangle pattern based on a given number 'N' for any test case.
N = 4
1
232
34545
4567654
The pat...
Print a triangle pattern of numbers based on a given number 'N'.
Iterate through each row and print the numbers accordingly
Use spaces to center-align the numbers in each row
Increment the numbers in each row as per the pattern
Web server serves static content over HTTP, while application server runs dynamic content and business logic.
Web server handles HTTP requests and responses, serving static content like HTML, images, and CSS.
Application server executes business logic, runs dynamic content, and interacts with databases.
Web server examples include Apache, Nginx, while application server examples include Tomcat, JBoss.
Web server focuses on...
The internet is a global network of interconnected computers that communicate using standardized protocols.
The internet is made up of a vast number of interconnected networks of computers.
Data is transmitted over the internet using protocols such as TCP/IP.
Websites are hosted on servers connected to the internet, and users access them using web browsers.
Internet Service Providers (ISPs) provide access to the internet f...
SQL query to find the nth highest salary
Use the 'SELECT DISTINCT' statement to get unique salary values
Order the salaries in descending order using 'ORDER BY' clause
Use 'LIMIT' and 'OFFSET' to get the nth highest salary
Round duration - 30 minutes
Round difficulty - Easy
Typical HR round with behavioral problems.
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.
Print the level order traversal of binary tree in spiral form
Perform level order traversal of the binary tree
Alternate the direction of traversal for each level
Use a stack to reverse the order of nodes in each level
Print the nodes in the order of traversal
Find the maximum element in each subarray of size k in a given array.
Iterate through the array from index 0 to n-k.
For each subarray of size k, find the maximum element.
Store the maximum elements in a separate array.
Return the array of maximum elements.
To find the Kth largest element in two sorted arrays, we can use the merge step of merge sort algorithm.
Merge the two arrays into a single sorted array using a modified merge sort algorithm.
Return the Kth element from the merged array.
Merge two sorted arrays into one sorted array with expected time complexity of (m+n).
Use a two-pointer approach to compare elements from both arrays and merge them into the first array.
Start comparing elements from the end of both arrays and place the larger element at the end of the first array.
Continue this process until all elements from the second array are merged into the first array.
The algorithm finds the position of the 3rd occurrence of 'B' in an n-ary tree from a given index in constant time complexity.
Traverse the n-ary tree using a depth-first search (DFS) algorithm
Keep track of the count of 'B' occurrences
When the count reaches 3, return the current position
If the end of the tree is reached before the 3rd 'B', return -1
Check if a given string is a composite of two words from a limited dictionary.
Create a hash set of all the words in the dictionary.
Iterate through all possible pairs of substrings in the given string.
Check if both substrings are present in the hash set.
If yes, return true. Else, return false.
Switch adjacent nodes in a single linked list.
Traverse the linked list and swap adjacent nodes.
Keep track of previous node to update its next pointer.
Handle edge cases for first two nodes and last node.
Example: 1->2->3->4 becomes 2->1->4->3.
Traverse only the left sub-tree of a binary search tree.
Start at the root node
If the left child exists, visit it and repeat the process
If the left child does not exist, return to the parent node
Continue until all nodes in the left sub-tree have been visited
Design an efficient data structure for two lifts in a building of n floors.
Use a priority queue to keep track of the floors each lift is heading to
Implement a scheduling algorithm to determine which lift to assign to a new request
Consider adding a weight limit to each lift to prevent overloading
Use a hash table to keep track of the current location of each lift
To find the maximum number that can be formed from the digits of an integer.
Convert the integer to a string
Sort the characters in descending order
Join the sorted characters to form the maximum number
Reverse all the words in a given string
Split the string into an array of words
Loop through the array and reverse each word
Join the reversed words back into a string
Explaining how to handle 'n' in a string during swapping process
Identify the positions of 'n' in the string
Exclude those positions from the swapping process
Use a temporary variable to swap the characters
Ensure the swapped characters are not 'n'
Return the modified string
We can use any sorting algorithm like quicksort, mergesort, heapsort, etc.
Choose the appropriate sorting algorithm based on the size of the file and the range of numbers
Implement the chosen algorithm in the programming language of choice
Read the numbers from the file into an array or list
Apply the sorting algorithm to the array or list
Write the sorted numbers back to the file
Word suggestions in Eclipse can be implemented using algorithms like Trie or N-gram models.
Use Trie data structure to store the dictionary of words
Implement auto-complete feature using Trie
Use N-gram models to suggest words based on context
Train the N-gram model on a large corpus of text data
Combine both approaches for better accuracy
Consider user's typing speed and frequency of words for better suggestions
To check if a number k lies in a sequence formed by adding previous 2 elements, start with a=0 and b=1 and iterate until k is found or exceeded.
Start with a=0 and b=1
Iterate through the sequence until k is found or exceeded
If k is found, return true. If exceeded, return false
Check if a Binary Tree is a Binary Search Tree (BST)
A BST has the property that all nodes in the left subtree of a node have values less than the node's value, and all nodes in the right subtree have values greater than the node's value
We can traverse the tree in-order and check if the resulting sequence is sorted
Alternatively, we can recursively check if each node satisfies the BST property
Keep track of kth largest number in a stream of numbers.
Use a min-heap of size k to keep track of kth largest number.
For each incoming number, compare it with the root of the heap.
If it is larger than the root, replace the root with the new number and heapify.
The root of the heap will always be the kth largest number.
Infix expression can be evaluated using the concept of operator precedence and associativity.
Convert the infix expression to postfix expression using stack data structure
Evaluate the postfix expression using stack data structure
Use operator precedence and associativity rules to determine the order of evaluation
Parentheses can be used to override the default order of evaluation
I applied via Referral
Design optimal data structures for LRU cache
Use a doubly linked list to keep track of recently used items
Use a hash table to store key-value pairs for quick access
When an item is accessed, move it to the front of the linked list
When the cache is full, remove the least recently used item from the back of the linked list and hash table
Convert a sorted array to balanced binary search tree
Find the middle element of the array and make it the root of the tree
Recursively construct the left subtree using the left half of the array
Recursively construct the right subtree using the right half of the array
Repeat until all elements are added to the tree
Reverse a singly linked list in groups of k inplace
Divide the linked list into groups of k nodes
Reverse each group of k nodes
Connect the reversed groups to form the final linked list
Optimal data structure for storing words and their meanings
Use a hash table with the word as the key and a list of meanings as the value
Each meaning can be stored as a string or an object with additional information
Consider using a trie data structure for efficient prefix search
Implement a search function that can handle partial matches and synonyms
A recursive routine to calculate a ^ n
The base case is when n is 0, in which case the result is 1
For any other value of n, the result is a multiplied by the result of a^(n-1)
The recursive function should call itself with a^(n-1) as the new input
Design optimal data structure for never-ending stream of numbers for insertion, deletion, searching, kth largest and kth smallest.
Use a balanced binary search tree like AVL or Red-Black tree for efficient insertion, deletion, and searching.
Maintain two heaps, one for kth largest and one for kth smallest.
For finding kth largest, use a min heap of size k and for kth smallest, use a max heap of size k.
Alternatively, use a...
I applied via Campus Placement
The question asks to convert the leaves of a binary tree into a doubly linked list without using extra space.
Traverse the binary tree in a depth-first manner
When a leaf node is encountered, update its left and right pointers to form the doubly linked list
Keep track of the previous leaf node to update its right pointer
Return the head of the doubly linked list
Count number of ways to reach opposite corner of a m*n table moving in two directions only.
Use dynamic programming to solve the problem
The number of ways to reach a cell is the sum of the number of ways to reach the cell above it and the cell to the left of it
The number of ways to reach the opposite corner is the number of ways to reach the cell in the last row and last column
Example: For a 2*2 table, there are 2 ways ...
The number of ways to travel n steps by taking one or two steps at a time.
This is a classic problem that can be solved using dynamic programming.
The number of ways to travel n steps is equal to the sum of the number of ways to travel n-1 steps and n-2 steps.
Use an array to store the number of ways for each step, starting with base cases for 0 and 1 steps.
Iterate through the array to calculate the number of ways for eac
Convert infix expression to postfix expression.
Use a stack to keep track of operators.
Iterate through the infix expression and push operands to output.
If an operator is encountered, pop operators from stack until a lower precedence operator is found.
Push the operator to stack.
After iterating, pop remaining operators from stack and append to output.
Reverse the output to get postfix expression.
Some of the top questions asked at the Times Internet Senior Frontend Web Developer interview -
based on 1 interview
Interview experience
Senior Software Engineer
145
salaries
| ₹0 L/yr - ₹0 L/yr |
Product Manager
107
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Developer
95
salaries
| ₹0 L/yr - ₹0 L/yr |
Manager
73
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Engineer
64
salaries
| ₹0 L/yr - ₹0 L/yr |
Info Edge
Network 18
Times Group
INDIA TODAY GROUP