Freshworks
10+ Adani Group Interview Questions and Answers
Q1. Triplets with Given Sum Problem
Given an array or list ARR
consisting of N
integers, your task is to identify all distinct triplets within the array that sum up to a specified number K
.
Explanation:
A triplet i...read more
The task is to identify all distinct triplets within an array that sum up to a specified number.
Iterate through the array and use nested loops to find all possible triplets.
Keep track of the sum of each triplet and compare it with the target sum.
Print the triplet if the sum matches the target sum, else print -1.
Q2. K-th Largest Number in a BST
Given a binary search tree (BST) consisting of integers and containing 'N' nodes, your task is to find and return the K-th largest element in this BST.
If there is no K-th largest e...read more
Find the K-th largest element in a BST.
Perform reverse in-order traversal of the BST to find the K-th largest element.
Keep track of the count of visited nodes to determine the K-th largest element.
Return -1 if there is no K-th largest element in the BST.
Q3. Count Ways to Reach the N-th Stair Problem Statement
You are provided with a number of stairs, and initially, you are located at the 0th stair. You need to reach the Nth stair, and you can climb one or two step...read more
The problem involves counting the number of distinct ways to climb N stairs by taking 1 or 2 steps at a time.
Use dynamic programming to solve this problem efficiently.
The number of ways to reach the Nth stair is equal to the sum of ways to reach (N-1)th stair and (N-2)th stair.
Handle modulo 10^9+7 to avoid overflow issues.
Consider base cases for 0th and 1st stair.
Optimize the solution by using constant space instead of an array.
Designing the Low-Level Design (LLD) and High-Level Design (HLD) for a system like BookMyShow.
For HLD, identify main components like user interface, booking system, payment gateway, and database.
For LLD, break down each component into detailed modules and their interactions.
Consider scalability, security, and performance in both designs.
Example: HLD - User selects movie -> Booking system checks availability -> Payment gateway processes transaction.
Example: LLD - Booking syste...read more
Designing a database schema for a support ticketing system like Freshdesk.
Create a 'Tickets' table with fields like ticket ID, subject, description, status, priority, etc.
Include a 'Users' table for customer and agent information.
Establish a 'Categories' table for ticket categorization.
Implement a 'Comments' table to track communication history.
Utilize foreign keys to establish relationships between tables.
Q6. How do you build a tiny URL Application?
A tiny URL application is built by generating short aliases for long URLs, storing them in a database, and redirecting users to the original URL when the alias is accessed.
Generate a unique short alias for each long URL
Store the alias and corresponding long URL in a database
Implement a redirect mechanism to redirect users from the alias to the original URL
Handle edge cases like duplicate URLs, expired aliases, and invalid URLs
Q7. Count pair whose sum is perfect square.
Count pairs in an array whose sum is a perfect square.
Iterate through the array and calculate the sum of each pair.
Check if the sum is a perfect square using a function.
Increment a counter if the sum is a perfect square.
Return the final count of pairs.
Q8. Immediate higher number to right
The immediate higher number to the right of each element in an array
Iterate through the array from right to left
For each element, compare it with the elements to its right to find the immediate higher number
Store the immediate higher number in a new array
Q9. Kth largest number in BST
To find the Kth largest number in a Binary Search Tree (BST), we can perform an in-order traversal and keep track of the Kth largest element.
Perform an in-order traversal of the BST to get the elements in non-decreasing order.
Keep track of the Kth largest element while traversing the BST.
Return the Kth largest element once found.
Q10. Implement debounce function
Debounce function delays the execution of a function until after a specified amount of time has passed since the last time it was invoked.
Create a function that takes a function and a delay time as parameters
Use setTimeout to delay the execution of the function
Use clearTimeout to reset the timer if the function is invoked again within the delay time
More about working at Freshworks
Interview Process at Adani Group
Top Senior Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month