Info Edge
100+ Interview Questions and Answers
Ninja is given an integer ‘N’ . One day Ninja decides to break the integer into K positive parts (K>=2) such that the sum of all parts is equal to ‘N’.Ninja wants to maximize the product of al...read more
Given an integer ‘N’ representing the number of pairs of parentheses, Find all the possible combinations of balanced parentheses with the given number of pairs of parentheses.
Note :
Conditi...read more
You are Harshad Mehta’s friend. He told you the price of a particular stock for the next ‘N’ days. You can either buy or sell a stock. Also, you can only complete at most 2-transactions. Find ...read more
Q4. Write the code for rearranging the array in consecutive pair multiplication. For example consider an array with 10 element A0, A1, A2......A9. The resultant array will be A0*A1, A1*A2, A2*A3, and so on. The fin...
read moreRearrange array in consecutive pair multiplication in descending order.
Create a new array to store the multiplied values
Use a loop to iterate through the original array and multiply consecutive pairs
Write a compare function to sort the new array in descending order
Given an array ‘A’ having ‘N’ integers and an integer ‘m’. You need to rearrange the array elements such that after re-arrangement difference of array elements with ‘m’ should be in a s...read more
Ninja is learning the binary representation of the numbers. He wanted to practice the topic, so he picked a question. The problem statement says, two numbers, ‘A’ and ‘B’ are given. Find the numb...read more
How many times in a day do the two hands on a clock coincide?
You are given a sorted array A consisting of N integers. Your task is to find the magic index in the given array.
Note :
A magic index in an array A[0 ... N - 1] is defined to be an index i such that...read more
Q9. Q: What is a Transaction in DBMS and ACID properties? Q: What is Thread and how it is different from the Process? Q: What are some Linux commands. Write any 5 commands? Q: Why sudo is used for commands? Q: Linu...
read moreAnswers to common technical questions in a software engineering interview
A transaction in DBMS is a sequence of operations that must be treated as a single unit of work. ACID properties ensure reliability and consistency of transactions.
A thread is a lightweight process that shares memory and resources with other threads in the same process. A process is a separate instance of a program.
Common Linux commands include ls, cd, mkdir, rm, and grep.
sudo is used to run commands wit...read more
You have been given a binary tree of integers. Your task is to print the boundary nodes of this binary tree in Anti-Clockwise direction starting from the root node.
NOTE:
The boundary nodes of...read more
Q11. System design of BookMyShow. Design the algorithm and database for the seat booking system. How this the system will handle the case when the payment gets failed. Again he asked me to write the query for the ti...
read moreDesign algorithm and database for seat booking system of BookMyShow and handle failed payments.
Create a database with tables for movies, theaters, seats, bookings, and payments
Use a locking mechanism to prevent double booking of seats
If payment fails, release the locked seats and notify the user
Write a query to get the timestamp in SQL: SELECT CURRENT_TIMESTAMP;
Q12. How would you introduce a new version of an API without breaking the previous one?
Introduce new API version without breaking the previous one.
Use versioning in the API endpoint URL
Provide documentation for both versions
Gradually phase out the old version
Use backward-compatible changes
Test thoroughly before releasing the new version
You are given a linked list of 'N' nodes and an integer 'K'. You have to reverse the given linked list in groups of size K i.e if the list contains x nodes numbered from 1 to x, then you...read more
What happens when you enter Google.com on the web browser.
Q15. To write a program which can divide, multiply, subtract and add two fractional number and give solution in simplest fraction form. Every fractional number should be consider as an object.
A program to perform basic arithmetic operations on fractional numbers and simplify the result.
Create a Fraction class with numerator and denominator attributes
Implement methods for addition, subtraction, multiplication, and division
Use the Euclidean algorithm to simplify the result
Handle edge cases such as dividing by zero or negative denominators
Pre-requisites: Anagrams are defined as words or names that can be formed by rearranging letters of another word. Such as "spar" can be formed by rearranging letters of "rasp". Hence, "spar" and "...read more
Q17. Build a pyramid pattern of numbers in O(n) time using any language.
Print a pyramid pattern of numbers in O(n) time.
Use nested loops to print the pattern.
The outer loop will iterate from 1 to n.
The inner loop will iterate from 1 to the current value of the outer loop.
Print the inner loop variable and a space after each iteration.
Print a new line after the inner loop completes.
Why Node.js is a single threaded language ?
You are given an array/list ARR consisting of N integers. Your task is to find all the distinct triplets present in the array which adds up to a given number K.
An array is said to have a...read more
Q20. How would you use your Data structures and algorithms knowledge in managing the working of a server?
Data structures and algorithms can be used to optimize server performance and improve scalability.
Implement efficient data structures for storing and accessing data on the server
Use algorithms to optimize server processes and reduce response times
Implement caching algorithms to improve performance and reduce server load
Use data structures to manage server resources and prioritize tasks
Implement load balancing algorithms to distribute traffic evenly across multiple servers
You are given a matrix of 'N' rows and 'M' columns consisting of lowercase characters. You are provided with a string ‘STR,’ and your task is to find the length of the longest consecutive ...read more
Ninja is playing with numbers but hates when he gets duplicate numbers. Ninja is provided an array, and he wants to remove all duplicate elements and return the array, but he has to maintain th...read more
Q23. Write a program to evaluate an algebraic expression e.x. (x+y-z) where the values of x,y,z are already provided to you
Program to evaluate algebraic expression with given values
Use a stack to keep track of operators and operands
Iterate through the expression and push operands onto the stack
When an operator is encountered, pop the top two operands and perform the operation
Push the result back onto the stack
Repeat until the entire expression has been evaluated
Q24. Write a program to find all the elements which are present in one array but not in other array.
Program to find elements present in one array but not in other array
Iterate through each element in the first array and check if it exists in the second array
If not found, add it to a new array of unique elements
Repeat the process for the second array to find elements unique to it
You are given an integer ’N’ denoting the length of the array ‘Arr’ of strings made up of lower case English alphabets. The cost of this array is equal to the sum of length of each string in the ...read more
You are given an arbitrary binary tree, a node of the tree, and an integer 'K'. You need to find all such nodes which have a distance K from the given node and return ...read more
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
You have been given a sorted (lexical order) dictionary of an alien language. Write a function that finds the order of characters in the alien language. This dictionary will be given to you in t...read more
Q28. How do you decide which type of tech stack to use?
Tech stack selection depends on project requirements, team expertise, scalability, and budget.
Analyze project requirements and choose a stack that fits best
Consider team expertise and choose a stack that team is comfortable with
Evaluate scalability requirements and choose a stack that can handle future growth
Consider budget constraints and choose a stack that is cost-effective
Research and compare different stacks to make an informed decision
Q29. Why have you chosen NodeJS for building your projects?
NodeJS is fast, scalable and has a large community support.
NodeJS is built on Chrome's V8 JavaScript engine which makes it fast and efficient.
It is event-driven and non-blocking which makes it scalable for handling large amounts of data.
NodeJS has a large community support with a vast number of libraries and modules available.
It is also cross-platform compatible and can be used for both server-side and client-side development.
Examples of popular NodeJS projects include Netfli...read more
Q30. What is stoi function (stoi() function)? Its uses and code to Implement stoi function.
stoi() function converts a string to an integer.
stoi() is a C++ function that takes a string as input and returns an integer.
It is used to convert a string of digits into an integer.
It can also handle negative numbers and ignore leading whitespace.
Example: int num = stoi("123"); // num is now 123
You are given a positive integer N, your task is to find all the Jumping Numbers smaller than or equal to N.
A number is defined as a Jumping Number if all adjacent digits in it have an absolute ...read more
You are given a sorted integer array' ARR' of size 'N'. You need to remove the duplicates from the array such that each element appears only once. Return the length of this ne...read more
How do you ensure that your website design or web application is accessible and user-friendly? How do you structure your CSS and JavaScript to make it easier for other developers to work with...read more
Q35. Write a program to find the largest palindromic substring in the input string.
Program to find the largest palindromic substring in input string.
Iterate through each character in the input string and check for palindromic substrings.
Keep track of the largest palindromic substring found so far.
Use dynamic programming or expand around center approach for efficient solution.
Example: Input string 'babad', largest palindromic substring is 'bab' or 'aba'.
Q36. Find minimum number of coins that make a given value using backtracking and dynamic programming both.
Find minimum number of coins for a given value using backtracking and dynamic programming.
Backtracking involves exploring all possible solutions and choosing the best one.
Dynamic programming involves breaking down the problem into smaller subproblems and solving them.
For backtracking, we can start with the largest coin and keep subtracting it until we reach the target value.
For dynamic programming, we can create a table to store the minimum number of coins needed for each val...read more
Q38. Write a program to find all triplets with a given sum.
Program to find all triplets with a given sum in an array.
Use three nested loops to iterate through all possible combinations of triplets.
Check if the sum of the current triplet is equal to the given sum.
Store the triplets that satisfy the condition in a list and return the list.
Q39. Write a program to evaluate a mathematical expression (stack was involved).
Program to evaluate a mathematical expression using stack
Use a stack to store operands and operators
Iterate through the expression and push operands onto the stack
When an operator is encountered, pop operands from the stack, perform the operation, and push the result back onto the stack
Continue until the entire expression is evaluated
The final result will be the top element of the stack
Ninja is given a pattern. Now he is asked to print the same pattern for any given ‘N’ number of rows.
For example, Pattern for ‘N’ = 4 will be. 1 232 34545 4567654
Input Format:
The...read more
Explain the updating phase of React lifecycle.
Difference between process and thread
Explain different OSI Layers
Q45. To write a program which will detect repeated word sequences.
Program to detect repeated word sequences
Read input text and split into words
Create a dictionary to store word sequences and their frequency
Iterate through the words and check for repeated sequences
Output the repeated sequences and their frequency
You have been given a string ‘S’. You need to sort ‘S’ in increasing order based on the frequency of characters. If two characters have the same frequency then the character with ...read more
Q47. Write code for Longest Common Substring. (time limit for writing this code was 5-6 minutes)
Code for finding the longest common substring in an array of strings.
Iterate through the first string and check for all possible substrings
Check if the substring is present in all other strings
Keep track of the longest common substring found so far
Return the longest common substring
Q48. What are the SEO standards that one needs to follow?
SEO standards include optimizing website content, using relevant keywords, and building quality backlinks.
Optimize website content with relevant keywords and meta tags
Ensure website is mobile-friendly and has fast loading speed
Build quality backlinks from reputable sources
Use descriptive and unique page titles and URLs
Regularly update website content and add new pages
Avoid duplicate content and keyword stuffing
Utilize social media to promote website and increase visibility
Q49. How is an arrow function different from a normal function?
Arrow functions are shorter syntax for writing function expressions.
Arrow functions do not have their own 'this' keyword.
They cannot be used as constructors.
They cannot be used as methods in objects.
They have implicit return statements.
They have a more concise syntax than normal functions.
Q50. what is web server and application server
Web server handles HTTP requests and responses, while application server executes application logic.
Web server serves static content like HTML, CSS, JS files
Application server executes dynamic code like Java, Python, Ruby
Web server communicates with client, application server communicates with database
Examples of web servers: Apache, Nginx, IIS
Examples of application servers: Tomcat, JBoss, WebSphere
Q51. What are higher-order components in React?
Higher-order components are functions that take a component and return a new component with additional functionality.
Higher-order components (HOCs) are a pattern in React for reusing component logic.
They are functions that take a component and return a new component with additional functionality.
HOCs can be used for adding props, state, or lifecycle methods to a component.
Examples of HOCs include connect() from React Redux and withRouter() from React Router.
Q52. What are the pillars of OOPS?
The pillars of OOPS are Abstraction, Encapsulation, Inheritance, and Polymorphism.
Abstraction: Hiding implementation details and showing only necessary information.
Encapsulation: Binding data and functions together and restricting access to them.
Inheritance: Creating new classes from existing ones, inheriting properties and methods.
Polymorphism: Ability of objects to take on multiple forms and behave differently based on context.
Q53. Arrange a string based on the frequency of the characters
The question asks to arrange a string based on the frequency of the characters.
Create a dictionary to store the frequency of each character in the string.
Sort the dictionary based on the frequency of characters in descending order.
Create a new string by concatenating the characters in the sorted dictionary.
Q54. Build a system for College Fest Management.
A system for managing college fests
Create a website for event registration and ticketing
Develop a mobile app for real-time updates and notifications
Implement a database to store event details and participant information
Integrate payment gateway for online transactions
Include features for event scheduling, venue management, and volunteer coordination
Q55. Write the code to rearrange the array in maximum-minimum form.
Code to rearrange an array in maximum-minimum form.
Sort the array in descending order.
Create a new array and alternate between adding the maximum and minimum values from the sorted array.
Return the new array.
Time complexity: O(nlogn)
Space complexity: O(n)
Q56. Please show some sales skills by selling the water bottle of kenley
The Kenley water bottle is a high-quality, durable and stylish bottle that keeps your water cool for hours.
Highlight the features and benefits of the Kenley water bottle, such as its insulation properties and sleek design.
Emphasize the value and convenience it brings to the customer's daily life.
Address any potential concerns or objections the customer may have, such as the price or availability of similar products.
Offer a special promotion or discount to incentivize the cust...read more
how will you measure 4 litres from 3 litre and 5 liter mug
Q58. Find the sum of k smallest number in a BST.
Find sum of k smallest numbers in a BST.
Traverse the BST in-order and add the k smallest numbers to a sum variable.
Use a priority queue to keep track of the k smallest numbers.
If k is greater than the number of nodes in the BST, return the sum of all nodes.
If k is 0, return 0.
Q59. Search an element In a rotated sorted array.
Search an element in a rotated sorted array.
Find the pivot point where the array is rotated
Determine which half of the array the target element is in
Perform binary search on that half of the array
Handle edge cases such as duplicates and empty arrays
Q60. 2. From an array of integers which contains values for a particular stock . Find the value at which a person should buy and sell such that the profit is maximum.
Find the maximum profit from buying and selling a stock given an array of its values.
Iterate through the array and keep track of the minimum value seen so far.
Calculate the profit at each index and update the maximum profit seen.
Return the maximum profit.
Q1. Explain the projects undertaken?
Q2. What would you like to work on ? Web Technologies or android.
Q62. What is meant by code splitting?
Code splitting is a technique to split code into smaller chunks to improve performance.
Code is divided into smaller chunks that can be loaded on demand
Reduces initial load time and improves performance
Used in modern web development frameworks like React, Angular, and Vue
Example: splitting a large JavaScript file into smaller modules
What is web server and application server ?
Q64. Write the code for the time stamp in C.
Code for time stamp in C
Use the time.h header file
Call the time() function to get the current time in seconds
Convert the time to a string using strftime() function
Use the format string to specify the desired format of the time stamp
Q65. Addition of 2 numbers represented by Linked List
Addition of 2 numbers represented by Linked List
Traverse both linked lists simultaneously and add the corresponding nodes
If the sum is greater than 9, carry over the 1 to the next node
If one linked list is shorter than the other, pad it with 0's
Return the sum as a new linked list
What are the benefits of optimizing time to first byte?
Q67. tell the difference between sales and marketing
Sales focuses on selling products or services, while marketing focuses on promoting and creating demand for those products or services.
Sales involves direct interaction with customers to close deals.
Marketing involves creating strategies to reach and engage potential customers.
Sales focuses on individual transactions, while marketing focuses on long-term customer relationships.
Sales is more tactical and immediate, while marketing is more strategic and long-term.
Sales is about...read more
Create a class and than inherit it in child class. Create an object. Add some exceptions.
Q69. What are various growth hacking techniques which can be used to grow traffic?
Growth hacking techniques to increase traffic
Optimize website for search engines
Leverage social media platforms
Create viral content
Use email marketing campaigns
Collaborate with influencers
Offer referral incentives
Implement A/B testing
Utilize paid advertising
Engage in community building
What is the difference between get and post?
Q71. What would you like to work on ? Web Technologies or android
I would like to work on both web technologies and android.
I have experience in both web development and android app development.
Working on both will allow me to expand my skills and knowledge.
I am excited about the potential of creating seamless experiences across web and mobile platforms.
Examples of projects I have worked on include a web-based dashboard for data visualization and an android app for tracking fitness goals.
Q72. What is tree shaking in React?
Tree shaking is a process of eliminating unused code in React applications.
It is a part of the build process that removes dead code from the final bundle.
It helps in reducing the size of the bundle and improving the performance of the application.
It works by analyzing the code and identifying the parts that are not used.
It is achieved through tools like webpack and babel.
Example: If a component is not used in the application, tree shaking will remove it from the final bundle.
How can Page Load Time be optimised?
Q74. How you can convince the people to buy our products?what additional skills do you have?
I can convince people to buy our products by highlighting their benefits and addressing their needs.
I have excellent communication and persuasion skills.
I can effectively demonstrate the features and advantages of our products.
I can tailor my approach to meet the specific needs and preferences of each customer.
I can provide compelling testimonials and case studies to showcase the positive experiences of other customers.
I can offer special promotions or discounts to incentiviz...read more
Q75. What do you know about the real estate industry?
The real estate industry involves buying, selling, and renting properties for residential, commercial, or industrial purposes.
Real estate industry deals with properties for residential, commercial, or industrial use.
It involves buying, selling, and renting properties.
Real estate agents help clients in finding suitable properties.
Property developers construct and sell new buildings or developments.
Real estate market is influenced by factors like location, demand, and economic ...read more
How can you optimize for CRP?
Q77. How to cope with stress?
To cope with stress, it is important to practice self-care, seek support from others, and engage in stress-relieving activities.
Practice self-care by getting enough sleep, eating well, and exercising regularly.
Seek support from friends, family, or a therapist to talk about your feelings and get advice.
Engage in stress-relieving activities such as meditation, yoga, or hobbies you enjoy.
Set boundaries and prioritize tasks to avoid feeling overwhelmed.
Take breaks and practice re...read more
Q78. How would you brand the business vertical JobHai? keeping in mind economic and technological constraints
JobHai - Connecting job seekers with opportunities
Create a simple and memorable logo
Use social media platforms to reach a wider audience
Partner with local businesses to offer job fairs and workshops
Offer a user-friendly website and mobile app for job searching and application
Provide personalized job recommendations based on user preferences and qualifications
Q79. NoSQL vs SQL databases
NoSQL databases are non-relational and flexible, while SQL databases are relational and structured.
NoSQL databases are better suited for handling unstructured data
SQL databases are better suited for handling structured data
NoSQL databases are horizontally scalable
SQL databases are vertically scalable
Examples of NoSQL databases include MongoDB and Cassandra
Examples of SQL databases include MySQL and PostgreSQL
Q80. 1. Count the number of flips require to convert a binary string of 0 and 1 such that resultant string has alternate 0 and 1
Count the number of flips required to convert a binary string to alternate 0 and 1.
Iterate through the string and count the number of flips required to make it alternate.
Keep track of the current character and the expected character.
Example: 001101 -> 010101 requires 2 flips.
Example: 101010 -> 010101 requires 3 flips.
Q81. SQL query to get second largest salary of an employee from employee table
SQL query to get second largest salary of an employee from employee table
Use ORDER BY and LIMIT to get the second highest salary
SELECT MAX(salary) FROM employee WHERE salary < (SELECT MAX(salary) FROM employee)
Use subquery to get the highest salary and then exclude it to get the second highest salary
Given a login page and asked to write all possible test cases
Polyfill for array filter method and forEach method
Q84. What all and where the investments have been made?
Investments have been made in various areas including technology, infrastructure, and marketing.
Investments have been made in technology to improve our products and services.
Infrastructure investments have been made to expand our reach and improve logistics.
Marketing investments have been made to increase brand awareness and customer acquisition.
Specific examples include investing in a new CRM system, expanding our warehouse facilities, and launching a new advertising campaig...read more
What is Pub/Sub?
Q88. general puzzles: no of squares in a chessboard,total count of handshake in a room with x number of people,code to check whether a particular number is a power of 4 or not
Q89. What do you mean by run time polymorphism and how is it achieved?
Run time polymorphism is the ability of a method to do different things based on the object it is acting upon.
Run time polymorphism is achieved through method overriding in object-oriented programming.
It allows a subclass to provide a specific implementation of a method that is already provided by its superclass.
The actual method that gets called is determined by the type of object at run time.
Example: Animal class has a method 'makeSound'. Dog and Cat classes extend Animal a...read more
Q90. What are the issues/improvement areas in the existing AmbitionBox site
The existing AmbitionBox site has issues with user experience and search functionality.
The search functionality needs improvement to provide more accurate results.
The user interface can be made more intuitive and user-friendly.
The site can benefit from better categorization and organization of information.
The review system can be improved to encourage more detailed and informative reviews.
The mobile version of the site needs optimization for better performance and user experi...read more
Q91. Is there provision for share knowledge about productivity?
Yes, there is provision for sharing knowledge about productivity.
Yes, our company encourages employees to share their knowledge and best practices for improving productivity.
We have regular team meetings and training sessions where employees can discuss and exchange ideas on productivity.
We also have an internal knowledge-sharing platform where employees can post articles, tips, and resources related to productivity.
Additionally, there are mentorship programs where experience...read more
Write query to find nth highest salary.
Difference between web workers and service workers
Q94. algorithms->1.find all prime numbers till a number(sieve-of-eratosthenes/) 2.find missing and repeating numbers in a file of 1000 lines with a number between 1-1000 on every line(similar to find-a-repeating-and...
read moreQ95. Explain each oops concept with clarity and write a class where you are implementing these.
Explanation of OOPs concepts with a class implementation
Encapsulation: Class with private data members and public methods to access them
Inheritance: Class extending another class to inherit its properties and methods
Polymorphism: Class with multiple methods with the same name but different parameters
Abstraction: Class with abstract methods that must be implemented by subclasses
Q96. How will you use selenium in software testing
Selenium can be used for automated testing of web applications by simulating user interactions.
Selenium can automate repetitive manual testing tasks
It can be used to test web applications across different browsers and platforms
Selenium can simulate user interactions such as clicking buttons, filling forms, and navigating pages
It can also be used for regression testing and load testing
Selenium can generate detailed reports and logs for test results
Q97. Linked List reversal in groups of k
Reverses a linked list in groups of k
Break the linked list into groups of k nodes
Reverse each group individually
Connect the reversed groups back together
Q98. Reverse a linked list
Reverse a linked list
Iteratively swap the next and previous pointers of each node
Use three pointers to keep track of the current, previous, and next nodes
Update the head pointer to the last node after reversing
Q99. Question 2: What is more Important CSAT or NPS?
Both CSAT and NPS are important, but their significance depends on the specific goals and priorities of the organization.
CSAT (Customer Satisfaction) measures the overall satisfaction of customers with a specific interaction or experience.
NPS (Net Promoter Score) measures the loyalty and likelihood of customers to recommend a company or product to others.
CSAT focuses on immediate satisfaction, while NPS focuses on long-term loyalty and advocacy.
CSAT is useful for identifying ...read more
Q100. Sell me a product and how do you deliver it in market
I would sell a revolutionary skincare product that guarantees clear and glowing skin within 7 days.
Highlight the key benefits of the product such as clear skin, reduced acne, and improved complexion
Emphasize the unique ingredients and technology used in the product
Offer a limited-time discount or promotion to attract customers
Utilize social media influencers and beauty bloggers to create buzz around the product
Partner with beauty stores and online platforms for distribution
Top HR Questions asked in null
Interview Process at null
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month