Filter interviews by
I am a highly motivated individual with a passion for learning and achieving my goals.
I have a Bachelor's degree in Computer Science
I have completed several internships in software development
I am proficient in multiple programming languages including Java and Python
I enjoy working in a team environment and collaborating with others to solve problems
I am always looking for new challenges and opportunities to grow
Print the bottom view of a tree.
Traverse the tree in level order and keep track of horizontal distance of each node from the root.
Store the horizontal distance and node value in a map.
Print the node values in the map for the minimum and maximum horizontal distance for each level.
Convert a BST to a binary tree with each element replaced by the sum of all greater elements + its own sum.
Traverse the BST in reverse order (right, root, left)
Keep track of the sum of all greater elements seen so far
Update the current node's value with the sum of all greater elements seen so far + its own value
Recursively convert the right and left subtrees
Adding two numbers without arithmetic operators.
Use bitwise operators like XOR, AND, and left shift.
Add the two numbers using XOR and AND, then left shift the carry and add again until there is no carry.
Example: 5 + 3 = 8. 5 in binary is 101, 3 in binary is 011. XOR gives 110, AND gives 001, left shift gives 010.
Example continued: XOR 110 and 010 gives 100, AND 110 and 010 gives 010, left shift gives 1000. No carry, so
Use randomized pivot selection to avoid worst-case scenario
Randomly select a pivot element instead of always choosing the first or last element
This reduces the likelihood of selecting a pivot that is already in its correct position
Example: Instead of always choosing the first element as pivot, randomly select an element between the first and last element
This ensures that the worst-case scenario of O(n^2) is avoided and
Find length of longest string with no repeating characters.
Use a hash set to keep track of seen characters.
Iterate through the string and update the hash set and length.
Return the maximum length found.
Minimum number of steps to reach finish word from start word in a dictionary with words of length 3 and changing only one digit.
Use BFS algorithm to find the shortest path
Create a graph with words as nodes and edges between words that differ by only one character
Start BFS from the start word and stop when the finish word is found
Return the length of the path from start to finish word
Finding pattern in an array of strings.
Look for common prefixes or suffixes
Check for repeating patterns
Analyze the length of strings
I am a highly motivated individual with a passion for learning and growth.
I have a degree in computer science and have worked as a software developer for 3 years.
I am proficient in several programming languages including Java, Python, and C++.
I am a quick learner and enjoy taking on new challenges.
In my free time, I enjoy hiking and playing guitar.
AJAX stands for Asynchronous JavaScript and XML. It is a technique used for creating fast and dynamic web pages.
AJAX allows web pages to update asynchronously by exchanging small amounts of data with the server behind the scenes.
It uses XMLHttpRequest object to communicate with the server.
AJAX can be used to create interactive web applications that can update data without reloading the entire page.
Examples of AJAX-base...
Print the Next Greater Element (NGE) for every element in an array. If it doesn’t exceed then print -1.
Iterate through the array and for each element, find the next greater element using a stack.
If the next greater element is found, print it. Otherwise, print -1.
Time complexity: O(n)
AJAX is a technique for creating fast and dynamic web pages without reloading the entire page.
AJAX stands for Asynchronous JavaScript and XML
It allows for asynchronous communication between the client and server
Data is sent and received in the background without interrupting the user's experience
AJAX is commonly used for auto-suggest search boxes, real-time updates, and form submissions
Examples of AJAX frameworks inclu
Find the minimum number of steps to reach a finish word from a start word by changing only one digit at a time.
Use breadth-first search algorithm to find the shortest path.
Create a graph with words as nodes and edges between words that differ by one character.
Start from the start word and explore all its neighbors, then move to their neighbors and so on until the finish word is found.
Keep track of visited nodes to avoi
Auto Complete system suggests possible search queries as the user types.
Uses algorithms to predict and suggest search queries based on user input
Saves time and effort for users by providing relevant suggestions
Can be based on user history, location, and other factors
Examples include Google search suggestion, YouTube search suggestion, and Amazon search suggestion
CouponDunia interview questions for popular designations
To identify whether a binary tree is a Binary Search Tree or not.
Check if the left subtree is a Binary Search Tree
Check if the right subtree is a Binary Search Tree
Check if the root node is greater than all the nodes in the left subtree
Check if the root node is less than all the nodes in the right subtree
Solution for inorder traversal in sorted order without using array
Implement a binary search tree and perform inorder traversal
Use a stack to simulate the recursive function call stack
Maintain a variable to keep track of the previously visited node
Compare the current node with the previously visited node to check if it is in sorted order
Convert a BST to a binary tree with each element replaced by sum of all greater elements.
Traverse the BST in reverse inorder and keep track of the sum of all greater elements.
Replace each node's value with the sum and update the sum.
Recursively perform the above steps on left and right subtrees.
Time complexity: O(n), Space complexity: O(h) where h is the height of the tree.
Find the 2nd highest salary from an employee table in SQL.
Use the SELECT statement to retrieve the salaries in descending order.
Use the LIMIT keyword to limit the result set to the second row.
Use a subquery to exclude the highest salary from the result set.
I am a software engineer with experience in developing web applications and a passion for problem-solving.
Experienced in developing web applications using languages such as Java, Python, and JavaScript
Proficient in using frameworks such as Spring, Django, and React
Strong problem-solving skills and ability to work in a team environment
Passionate about learning new technologies and keeping up with industry trends
Given an array, determine if it follows one of four patterns: increasing, decreasing, increase then decrease, or decrease then increase.
Iterate through the array and compare each element to the previous one.
If all elements are increasing, it follows the increasing pattern.
If all elements are decreasing, it follows the decreasing pattern.
If there is a point where the elements start decreasing after increasing, it follow...
Given an array of distinct positive numbers, find the maximum sum of non-adjacent elements.
Use dynamic programming to keep track of the maximum sum at each index
At each index, choose between including the current element or skipping it
The maximum sum at index i is the maximum of the sum including i-2 and i or the sum excluding i
Return the maximum sum at the last index
Use machine learning algorithms to analyze user behavior and preferences to suggest personalized coupons.
Collect user data such as purchase history, search history, and demographics
Use machine learning algorithms to analyze the data and identify patterns
Create personalized coupon suggestions based on the identified patterns
Regularly update and refine the algorithm to improve accuracy
Allow users to provide feedback on t
Top trending discussions
I applied via Campus Placement
I applied via Referral
Implementing a shuffle function for a playlist of songs
Create a new empty playlist
Randomly select a song from the original playlist and add it to the new playlist
Remove the selected song from the original playlist
Repeat until all songs have been added to the new playlist
Return the new shuffled playlist
Memory leak is a situation where a program fails to release memory it no longer needs.
Memory leaks can cause a program to consume more and more memory over time, eventually leading to crashes or other issues.
Memory leaks can be caused by programming errors such as not freeing memory after it is no longer needed.
Tools like valgrind can be used to detect memory leaks in C and C++ programs.
Examples of memory leaks include...
Arrays have fixed size and can lead to memory wastage and performance issues.
Arrays have a fixed size and cannot be resized dynamically.
Inserting or deleting elements in an array can be time-consuming.
Arrays can lead to memory wastage if they are not fully utilized.
Arrays can cause performance issues if they are too large and need to be traversed frequently.
Arrays can also be prone to buffer overflow attacks.
Example: A...
Function to hide text on mouse click in JavaScript
Create a function that takes an element as input
Add an event listener to the element for a mouse click
Toggle the element's display property between 'none' and its original value
Find two elements in an unsorted array whose sum is equal to a given number x.
Use a hash table to store the difference between x and each element in the array.
Iterate through the array and check if the current element is in the hash table.
Return the pair of elements that add up to x.
BST stands for Binary Search Tree, a data structure used for efficient searching and sorting operations.
BST is a tree-like data structure where each node has at most two children.
The left child of a node contains a value less than the parent node, while the right child contains a value greater than the parent node.
BST allows for efficient searching and sorting operations with a time complexity of O(log n).
Examples of a...
Number of possible BSTs with 2 and 3 nodes.
For 2 nodes, only 2 BSTs are possible.
For 3 nodes, 5 BSTs are possible.
Number of BSTs can be calculated using Catalan numbers formula.
Catalan(2) = 2, Catalan(3) = 5.
Answering the question about possible trees with two and three nodes.
For two nodes, there is only one possible tree.
For three nodes, there are three possible trees.
The formula for calculating the number of possible trees with n nodes is (2n-3)!!.
The double exclamation mark represents the double factorial function.
The double factorial function is defined as n!! = n(n-2)(n-4)...(1 or 2).
B+ trees are balanced trees used for indexing and searching large amounts of data.
B+ trees are similar to binary search trees but have multiple keys per node.
They are commonly used in databases and file systems.
B+ trees have a high fanout, reducing the number of disk accesses required for searching.
They are also self-balancing, ensuring efficient performance even with large amounts of data.
Example: In a database, a B+ ...
Yes, I have a few questions.
Can you tell me more about the team I'll be working with?
What is the company culture like?
What are the biggest challenges the team is currently facing?
Can you walk me through the development process for a typical project?
What opportunities are there for professional growth and development?
I prefer hash tables for their constant time lookup and insertion.
Hash tables are efficient for storing and retrieving data.
They have constant time complexity for both insertion and lookup.
They can be implemented using arrays or linked lists.
Examples include Python's dictionary and Java's HashMap.
Yes, we can implement a stack using two queues.
Push operation: Enqueue the element to the first queue.
Pop operation: Dequeue all elements from the first queue and enqueue them to the second queue until the last element. Dequeue and return the last element. Swap the names of the queues.
Top operation: Same as pop operation but don't dequeue the last element.
Example: Push 1, 2, 3. Queue 1: 1 2 3. Queue 2: empty. Pop opera...
Find minimum no of platforms required to avoid collision between trains based on their arrival and departure times.
Sort both arrays in ascending order
Initialize platform count and max count to 1
Loop through both arrays and compare arrival and departure times
If arrival time is less than or equal to departure time, increment platform count
Else, decrement platform count
Update max count if platform count is greater than ma
JVM stands for Java Virtual Machine. It is an abstract machine that provides a runtime environment for Java programs.
JVM is responsible for interpreting the compiled Java code and executing it.
It provides platform independence by converting bytecode into machine-specific code.
JVM has various components like class loader, bytecode verifier, and execution engine.
Compiler converts source code into bytecode, while JVM exec...
I am a software engineer with experience in developing web applications and a passion for learning new technologies.
Experienced in developing web applications using technologies such as Java, Spring, and Angular
Passionate about learning new technologies and keeping up with industry trends
Strong problem-solving skills and ability to work in a team environment
Completed a Bachelor's degree in Computer Science from XYZ Uni
PayTM is an Indian e-commerce payment system and digital wallet company.
PayTM was founded in 2010 by Vijay Shekhar Sharma.
It started as a mobile recharge and bill payment platform.
PayTM has expanded to offer services like online shopping, movie ticket booking, and travel bookings.
It also offers a digital wallet that can be used to pay for various services and products.
PayTM has over 350 million registered users and is ...
I would like to add a feature for splitting bills among friends.
The feature would allow users to split bills for movies, dinners, etc.
Users can select friends from their contact list and split the bill equally or unequally.
The app would send a notification to the selected friends to pay their share.
The feature would make it easier for users to split expenses and avoid awkward conversations.
It would also encourage more
My favourite app is Spotify. I would like to see improvements in the algorithm for personalized playlists.
Improved algorithm for personalized playlists
Better integration with social media platforms
Option to create collaborative playlists with friends
My favourite subject is Computer Science.
I enjoy programming and problem-solving.
I find algorithms and data structures fascinating.
I am interested in artificial intelligence and machine learning.
I like learning about new technologies and keeping up with industry trends.
I choose NIT Hamirpur because of its excellent academic reputation and beautiful campus.
NIT Hamirpur has a strong focus on academics and research, which aligns with my career goals.
The campus is located in a serene and picturesque location, which provides a conducive environment for learning.
The faculty members are highly experienced and knowledgeable, and are always willing to help students.
The college has state-of-th...
Count the number of continuous sequences with equal number of 0's and 1's in an array.
Iterate through the array and keep track of the count of 0's and 1's encountered so far.
Store the difference between the counts in a hash table and increment the count for that difference.
If the difference is already present in the hash table, add the count to the existing value.
Return the sum of all values in the hash table.
Count the number of palindromic substrings in a given string.
A substring is a contiguous sequence of characters within a string.
A palindrome is a string that reads the same backward as forward.
Use dynamic programming to count all palindromic substrings.
Time complexity can be reduced to O(n^2) using Manacher's algorithm.
Find the longest palindrome in a given string in linear time complexity.
Use Manacher's algorithm to find the longest palindrome in a string in O(n) time complexity.
The algorithm involves preprocessing the string to add special characters to handle even and odd length palindromes.
Then, it uses a combination of dynamic programming and symmetry properties to find the longest palindrome.
For example, in the string 'babad',
The value of pie is a mathematical constant approximately equal to 3.14159.
Pie is the ratio of the circumference of a circle to its diameter.
It is an irrational number, meaning it cannot be expressed as a finite decimal or fraction.
Pie is commonly used in geometry and trigonometry calculations.
The value of pie is often approximated as 3.14 or 22/7.
I am a passionate software engineer with experience in developing web applications using various technologies.
Experienced in developing web applications using HTML, CSS, JavaScript, and frameworks like React and Angular
Proficient in backend development with Node.js and databases like MongoDB and MySQL
Familiar with version control systems like Git and deployment tools like Docker
Strong problem-solving skills and ability
Yes, I believe I will be able to fit in the company based on my experience, skills, and values.
I have experience working in diverse teams and adapting to different work cultures.
I share the company's values and vision, which align with my own.
I am eager to learn and contribute to the team, fostering a positive work environment.
I have strong communication skills, which are essential for collaboration and teamwork.
Some of the top questions asked at the CouponDunia interview -
based on 8 reviews
Rating in categories
2-4 Yrs
Not Disclosed
Assistant Manager
5
salaries
| ₹0 L/yr - ₹0 L/yr |
Sales Executive
3
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Software Engineer
3
salaries
| ₹0 L/yr - ₹0 L/yr |
Executive Accountant
3
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Development Engineer Test
3
salaries
| ₹0 L/yr - ₹0 L/yr |
Cashkaro.com
GrabOn
Nearbuy
MagicPin