Filter interviews by
I was interviewed in Feb 2025.
Fundamental questions regarding SQL Server.
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
I was interviewed before Sep 2020.
Round duration - 45 Minutes
Round difficulty - Easy
The round was conducted at 12 in the college campus. It was a pen and paper based coding round and had 2 coding questions for which we had to write the best approach.
Given an array Arr
consisting of N integers, your task is to find the equilibrium index of the array.
An index is considered as an equilibrium index if the sum of elem...
Find the equilibrium index of an array where sum of elements on left equals sum on right.
Iterate through the array and calculate the total sum of all elements.
Then iterate again and keep track of the left sum and right sum, checking for equilibrium.
Return the index when left sum equals right sum, or -1 if no equilibrium index found.
You are given a singly linked list of integers. Your task is to sort the linked list using the merge sort algorithm.
Merge Sort is a divide and conq...
Implement merge sort algorithm to sort a singly linked list of integers.
Divide the linked list into two halves using slow and fast pointers.
Recursively sort the two halves.
Merge the sorted halves using a merge function.
Handle base cases like empty list or single node list.
Ensure the termination of the linked list with -1 at the end.
Round duration - 45 Minutes
Round difficulty - Easy
There were 2 coding questions and we had to write the best approach for the questions.
Convert a given string 'S' into its equivalent representation based on a mobile numeric keypad sequence. Using the keypad layout shown in the reference, output the seque...
Convert a given string into its equivalent representation based on a mobile numeric keypad sequence.
Create a mapping of characters to their corresponding numeric keypad sequences.
Iterate through the input string and append the numeric sequence for each character to the output.
Handle lowercase characters only, ignore special characters, capital letters, and spaces in the input string.
You are provided with a string 'STR'
that consists of lowercase English letters ranging from 'a' to 'z'. Your task is to determine all non-empty possible subsequen...
Generate all possible subsequences of a given string.
Use recursion to generate all possible subsequences by including or excluding each character in the string.
Maintain a current index to keep track of the characters being considered.
Append the current character to each subsequence generated so far.
Recursively call the function with the next index to include the next character in subsequences.
Round duration - 40 minutes
Round difficulty - Easy
The interviewer asked me questions from arrays, strings and linked list.
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 keep track of the longest increasing subsequence ending at each element.
Initialize an array to store the lengths of the longest increasing subsequences.
Iterate through the array and update the lengths based on the previous elements.
Return the maximum length found in the array.
Given an integer N
, determine whether its binary representation is a palindrome.
The first line contains an integer 'T' representing the number of test cases.
The next 'T'...
Check if the binary representation of a given integer is a palindrome.
Convert the integer to binary representation.
Check if the binary representation is a palindrome by comparing it with its reverse.
Return true if it is a palindrome, false otherwise.
Tip 1 : Do at-least 200+ dsa problems from various topics.
Tip 2 : Make 2-3 projects and be well versed with their functionality.
Tip 3 : Practice aptitude questions and time yourself while doing the questions.
Tip 1 : Keep your resume short, try to make it one pager only.
Tip 2 : Mention only position specific projects, and if you have got a good academic score mention it on top.
I applied via Naukri.com and was interviewed before Sep 2019. There were 6 interview rounds.
I applied via Naukri.com and was interviewed in Aug 2020. There were 5 interview rounds.
Interfaces define a contract for classes to implement certain methods and properties.
Interfaces allow for polymorphism and loose coupling.
Classes can implement multiple interfaces.
Interfaces cannot be instantiated on their own.
Interfaces can have default method implementations.
Interfaces can be used to enforce design patterns like the adapter pattern.
I applied via Naukri.com and was interviewed in Sep 2020. There was 1 interview round.
API controller class instance is generated when a request is made to the API endpoint.
API controller class is responsible for handling incoming requests and returning responses.
Instance of API controller class is generated by the ASP.NET Core framework when a request is made to the API endpoint.
API controller class instance is disposed of after the request has been processed.
API controller class can be customized and c
based on 1 interview
Interview experience
Software Engineer
13
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Developer
7
salaries
| ₹0 L/yr - ₹0 L/yr |
Business Analyst
5
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Software Engineer
4
salaries
| ₹0 L/yr - ₹0 L/yr |
System Administrator
3
salaries
| ₹0 L/yr - ₹0 L/yr |
Cognizant
Teleperformance
iEnergizer
Reliance Retail