Add office photos
Employer?
Claim Account for FREE

CouponDunia

3.8
based on 8 Reviews
Filter interviews by

10+ Ramya Healthcare Interview Questions and Answers

Updated 5 Feb 2024

Q1. Given a binary tree how would you identify whether it is a Binary Search tree or not?

Ans.

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

Add your answer

Q2. Given a BST, convert it to a binary tree such that each element is replaced by the sum of all the elements greater than it?

Ans.

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.

Add your answer

Q3. Given an array. find the pattern it follows? there can be 4 patterns only: increasing, decreasing, increase then decrease and decrease then increase

Ans.

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 follows the increase then decrease pattern.

  • If there is a point w...read more

Add your answer

Q4. Solve it without using array (in case the solution is - Inorder traversal should be in sorted order)?

Ans.

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

Add your answer
Discover Ramya Healthcare interview dos and don'ts from real experiences

Q5. Given an array of distinct positive numbers find the maximum sum of elements such that no 2 elements occurring in the maximum sum set is adjacent to each other

Ans.

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

Add your answer

Q6. Given an employee table with employee name and salary find the 2nd highest salary in sql?

Ans.

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.

Add your answer
Are these interview questions helpful?

Q7. How can you improve suggestions of coupons to the users?

Ans.

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 the suggested coupons to further improve accuracy

Add your answer

Q8. There is a dictionary with few words each of length 3 and start and finish word is given. You can reach from one word to another word by changing only one digit. Like from cat, you can reach to hat or bat or ca...

read more
Ans.

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 avoid loops.

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. given a string, find the length of longest string where no character repeats twice?

Ans.

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.

Add your answer

Q10. Given an array, print the Next Greater Element (NGE) for every element. If it doesn’t exceed then print -1. They asked me to write full code

Ans.

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)

Add your answer

Q11. given a bst, convert it to a binary tree such that each element is replaced by the sum of all the elements greater than it+ its own sum?

Ans.

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

Add your answer

Q12. Explain Auto Complete system (like Google search suggestion)

Ans.

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

Add your answer

Q13. add two numbers without using arithmetic operators?

Ans.

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 result is 1000 in binary or 8 in decimal.

Add your answer

Q14. given an array. find the pattern it follows?

Ans.

Finding pattern in an array of strings.

  • Look for common prefixes or suffixes

  • Check for repeating patterns

  • Analyze the length of strings

Add your answer

Q15. print the bottom view of the tree?

Ans.

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.

Add your answer

Q16. Explain the working of AJAX in detail

Ans.

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 include jQuery, AngularJS, and React

Add your answer

Q17. What is AJAX?

Ans.

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-based applications include Google Maps, Gmail, and Facebook.

  • AJ...read more

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

4.0
 • 375 Interview Questions
3.5
 • 370 Interview Questions
4.2
 • 288 Interview Questions
4.2
 • 266 Interview Questions
4.7
 • 143 Interview Questions
3.8
 • 134 Interview Questions
View all
Top CouponDunia Interview Questions And Answers
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter