Filter interviews by
Clear (1)
Reverse nodes in k-group is a problem where we need to reverse every k nodes in a linked list.
Break the linked list into groups of k nodes
Reverse each group of k nodes
Connect the reversed groups back together
Top trending discussions
I applied via Company Website and was interviewed in Nov 2023. There was 1 interview round.
1 hour, 2 question. 1. Meetting scheduler (leetcode)
I was interviewed before Dec 2020.
Round duration - 60 Minutes
Round difficulty - Medium
This was a Data Structures and Algorithms round with preety good questions . I was expected to come up with an efficient approach and code it as well .
Your house is located at the origin (0,0) of a 2-D plane. There are N
neighbors living at different points on the plane. Your goal is to visit exactly K
neighb...
Find the K closest points to the origin in a 2-D plane using Euclidean Distance.
Calculate the Euclidean Distance of each point from the origin
Sort the points based on their distances
Return the first K points as the closest neighbors
Given a sorted array of 'N' integers, your task is to generate the power set for this array. Each subset of this power set should be individually sorted.
A power set of a set 'ARR' i...
Generate the power set of a sorted array of integers with individually sorted subsets.
Use recursion to generate all possible subsets by including or excluding each element in the array.
Sort each subset before adding it to the power set.
Handle base cases for empty array and single element array.
Ensure the subsets are unique by using a set data structure.
Time complexity can be exponential due to the nature of generating
Round duration - 50 Minutes
Round difficulty - Hard
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 .
Convert a string representing a Roman numeral into its integer equivalent and return the result.
Roman numerals are represented by seven different symbol...
Convert a Roman numeral string to its integer equivalent.
Create a mapping of Roman numeral symbols to their integer values.
Iterate through the input string and add the corresponding integer values.
Handle cases where subtraction is needed (e.g., IV = 4, IX = 9).
You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to find and return a list of all pairs of elements where each sum of a pair equals 'S'.
Find pairs of elements in an array that sum up to a given value, sorted in a specific order.
Iterate through the array and for each element, check if the complement (S - current element) exists in a hash set.
If the complement exists, add the pair to the result list.
Sort the result list based on the criteria mentioned in the question.
Return the sorted list of pairs.
Round duration - 50 Minutes
Round difficulty - Medium
This was also a DSA round with 2 questions . One was implementation heavy and the other was related to recursion and so I handled it carefully so that my code does not run into TLE or Segmentation Fault.
You are provided with a string expression
consisting of characters '+', '-', '*', '/', '(', ')' and digits '0' to '9', representing an arithmetic express...
Evaluate arithmetic expressions in infix notation with given operators and precedence rules.
Parse the infix expression to postfix using a stack.
Evaluate the postfix expression using a stack.
Handle operator precedence and parentheses while evaluating.
Ensure no division by zero cases and operands fit in 32-bit integer.
You are given a sorted integer array ARR
of size N
. Your task is to remove the duplicates in such a way that each element appears only once. The outpu...
Remove duplicates from a sorted array in-place with O(1) extra memory.
Use two pointers - one for iterating through the array and another for placing unique elements.
Compare current element with next element to identify duplicates and skip them.
Update array in-place by moving unique elements to the front.
Return the length of the array after removal of duplicates.
Round duration - 50 Minutes
Round difficulty - Medium
This was a typical System Design round where I was asked about the various features of Facebook and what sort of data structures and algorithms are used in implementing them .
Facebook stores likes and dislikes using a combination of databases and algorithms.
Likes and dislikes are stored in databases such as MySQL or Cassandra.
Algorithms are used to analyze user behavior and recommend content based on likes and dislikes.
User interactions with posts, pages, and ads are tracked to determine likes and dislikes.
Likes and dislikes may also be used to personalize the user's feed and target ads mor
Facebook implements graph search using a graph database to efficiently search for connections between users and their interests.
Facebook uses a graph database to store connections between users, pages, groups, etc.
The graph search algorithm traverses the graph to find relevant connections based on user queries.
It takes into account factors like user relationships, interests, and interactions to provide personalized sea
Round duration - 50 Minutes
Round difficulty - Medium
This was a preety intense round as I was grilled more on my System Design concepts but eventually I was able to asnwers all the questions with some help from the interviewer.
Hadoop is a framework for distributed storage and processing of large data sets.
Hadoop is used for storing and processing big data across a distributed network of computers.
It is based on the MapReduce programming model, which allows for parallel processing of data.
Hadoop consists of HDFS for storage and YARN for resource management.
It is used for tasks like data warehousing, log processing, recommendation systems, and...
Facebook Chat works by using a combination of websockets, long polling, and push technology to deliver real-time messaging.
Facebook Chat uses websockets for real-time communication between the client and server.
Long polling is used to check for new messages when websockets are not supported.
Push technology is used to notify users of new messages even when the chat window is not open.
Messages are stored in a database an...
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 10 Mar 2015
Algorithm to find 2 numbers in an array whose sum is equal to a target integer
Use a hash table to store the difference between target and each element in the array
Iterate through the array and check if the current element exists in the hash table
Return the pair of elements that sum up to the target integer
Write a select statement to retrieve work of all users who belong to my team.
Join USERS and WORK tables on user_id
Join MANAGERS and USERS tables on team
Filter by manager_id
The manifest.json file contains the most important information of a Chrome extension.
The manifest.json file includes the version number, permissions, content scripts, background scripts, and other important details.
It is located in the root directory of the extension.
It is required for all Chrome extensions.
Example: "manifest_version": 2, "version": "1.0", "permissions": ["tabs", "storage"]
Hashtable is faster for finding an item than a sorted list.
Hashtable has constant time complexity O(1) for finding an item.
Sorted list has logarithmic time complexity O(log n) for finding an item.
Hashtable uses hashing to directly access the item's location.
Sorted list requires binary search to find the item's location.
Hashtable is ideal for large datasets with frequent lookups.
Sorted list is ideal for datasets that re
JSON and XML are the most popular data interchange formats when using APIs.
JSON (JavaScript Object Notation) is a lightweight format that is easy to read and write. It is widely used in web APIs.
XML (Extensible Markup Language) is a more complex format that is also widely used in web APIs.
Other formats include CSV (Comma Separated Values), YAML (YAML Ain't Markup Language), and Protocol Buffers.
Popular APIs for Social Commerce services
Facebook Graph API for social media integration
Instagram API for photo sharing and tagging
Twitter API for real-time updates and customer engagement
Pinterest API for product discovery and sharing
Google Maps API for location-based services
PayPal API for secure payment processing
Use a script to iterate through each HTML page, locate phone numbers, and update their format.
Write a script using a programming language like Python or JavaScript to iterate through each HTML page
Use regular expressions to locate phone numbers in the pages
Update the format of the phone numbers as needed (e.g. adding country code, changing separators)
Save the updated HTML pages with the new phone number format
Designing Google Suggest system
I would start by analyzing user search patterns and frequently searched keywords
Then, I would create a database of these keywords and their associated search results
I would use indexing services to quickly retrieve relevant results for each keyword
I would also implement machine learning algorithms to improve the accuracy of suggestions over time
Check if a number is a power of 2 and odd.
To check if a number is a power of 2, use bitwise AND operator with the number and its predecessor. If the result is 0, it is a power of 2.
To check if a number is odd, use modulus operator with 2. If the result is 1, it is odd.
Example code in Python:
def is_power_of_two(num):
return num & (num - 1) == 0
def is_odd(num):
return num % 2 == 1
By introducing new menu items, optimizing pricing strategy, and improving the overall dining experience.
Conduct a survey to understand the preferences of employees
Introduce healthy and affordable meal options
Offer discounts for bulk orders or loyalty programs
Partner with local vendors to source fresh ingredients
Improve the ambiance and seating arrangements
Implement online ordering and delivery services
Reviewing 30 million ads from 42 languages in Google AdWords and rejecting non-compliant ads requires a systematic approach.
Create a set of specific rules and guidelines for ad compliance
Use automated tools to filter out ads that violate the rules
Assign a team of reviewers to manually check the remaining ads
Ensure that the reviewers are fluent in the languages of the ads they are reviewing
Regularly update the rules and...
Multiple data structures are used to print nodes in a specific order. One data structure cannot be used alone.
The given order suggests a depth-first search traversal of a tree-like structure.
A stack can be used to keep track of the nodes to be visited.
A queue can be used to store the children of a node in the order they are visited.
An array can be used to store the nodes in the required order.
A linked list can be used ...
Find largest pen using minimum comparisons with tops.
Divide pens into two groups and compare largest pen from each group with largest top.
Repeat the process with the group containing the largest pen until only one pen is left.
The remaining pen is the largest pen.
Total number of comparisons required is 2n-3.
Given n dice with 'a' sides and sum b, return no. of ways to obtain b. Optimize time and space complexity.
Use dynamic programming to reduce time complexity
Create a 2D array to store the number of ways to obtain each sum for each number of dice
Use rolling arrays to optimize space complexity
Example: n=2, a=6, b=7 -> 6 ways to obtain sum 7
Example: n=3, a=4, b=8 -> 21 ways to obtain sum 8
Sort 128 GB data on 2 machines with 64 GB RAM each. Extend to 1000 machines.
Use external sorting algorithm like merge sort or quick sort
Divide data into smaller chunks and sort them individually
Merge sorted chunks using additional RAM
For 1000 machines, use distributed sorting algorithms like MapReduce or Hadoop
Ensure data consistency and fault tolerance in distributed sorting
Python , sql coding test
I applied via Referral and was interviewed in Aug 2024. There were 2 interview rounds.
Binary search to find the closest element in a sorted array
Implement binary search to find the target element in the array
Keep track of the closest element found so far while searching
Update the closest element if a closer one is found during the search
Low level design for an online e-commerce website involves designing the architecture and components of the website.
Identify the main components such as user interface, database, payment gateway, product catalog, etc.
Design the database schema to store user information, product details, orders, etc.
Implement user authentication and authorization mechanisms for secure access.
Integrate payment gateway for processing tran...
Majorily on SQL and Databases
Use CSS to align two images with same width and height on a page
Set both images to have the same width and height using CSS
Use flexbox or grid layout to align the images horizontally or vertically
Adjust margins or padding to fine-tune the alignment
based on 1 interview
Interview experience
based on 1 review
Rating in categories
Content Moderator
308
salaries
| ₹0 L/yr - ₹0 L/yr |
Quality Analyst
233
salaries
| ₹0 L/yr - ₹0 L/yr |
Content Reviewer
84
salaries
| ₹0 L/yr - ₹0 L/yr |
SME
68
salaries
| ₹0 L/yr - ₹0 L/yr |
Accounts Manager
48
salaries
| ₹0 L/yr - ₹0 L/yr |
TikTok
Udaan