Add office photos
Employer?
Claim Account for FREE

Salesforce

4.0
based on 860 Reviews
Video summary
Filter interviews by

20+ GEM Hospital And Research Center Interview Questions and Answers

Updated 2 Aug 2024
Popular Designations

Q1. How will you handle cases with customers of bad temeament?

Ans.

I will remain calm, empathetic, and professional while actively listening to the customer's concerns and finding a solution.

  • Remain calm and composed

  • Listen actively to understand the customer's concerns

  • Show empathy towards the customer's frustrations

  • Maintain a professional demeanor throughout the interaction

  • Focus on finding a solution to the customer's issue

  • Avoid taking the customer's behavior personally

Add your answer

Q2. Ajax and asynchronous functions in JavaScript

Ans.

Ajax allows for asynchronous communication between the client and server in JavaScript.

  • Ajax stands for Asynchronous JavaScript and XML.

  • It allows for making requests to the server without reloading the entire page.

  • Asynchronous functions in JavaScript allow for non-blocking code execution.

  • Examples of asynchronous functions include setTimeout, setInterval, and fetch API.

Add your answer

Q3. Buy and Sell Stock Problem Statement

Imagine you are Harshad Mehta's friend, and you have been given the stock prices of a particular company for the next 'N' days. You can perform up to two buy-and-sell transa...read more

Ans.

The task is to determine the maximum profit that can be achieved by performing up to two buy-and-sell transactions on a given set of stock prices.

  • Iterate through the array of stock prices to find the maximum profit that can be achieved by buying and selling stocks at different points.

  • Keep track of the maximum profit that can be achieved by considering all possible combinations of buy and sell transactions.

  • Ensure that you sell the stock before buying again to adhere to the con...read more

Add your answer

Q4. Optimal Strategy for a Coin Game

You are playing a coin game with your friend Ninjax. There are N coins placed in a straight line.

Here are the rules of the game:

1. Each coin has a value associated with it.
2....read more
Ans.

The problem involves finding the optimal strategy to accumulate the maximum amount in a coin game with specific rules.

  • Start by considering the base cases where there are only 1 or 2 coins.

  • Use dynamic programming to keep track of the maximum amount that can be won at each step.

  • Consider the different scenarios when choosing a coin from either end of the line.

  • Keep track of the total winnings for both players and choose the optimal strategy to maximize your winnings.

  • Implement a r...read more

Add your answer
Discover GEM Hospital And Research Center interview dos and don'ts from real experiences

Q5. Spiral Matrix Problem Statement

You are given a N x M matrix of integers. Your task is to return the spiral path of the matrix elements.

Input

The first line contains an integer 'T' which denotes the number of ...read more
Ans.

The task is to return the spiral path of elements in a given matrix.

  • Iterate through the matrix in a spiral path by keeping track of boundaries.

  • Print elements in the order of top row, right column, bottom row, and left column.

  • Continue the spiral path until all elements are printed.

Add your answer

Q6. Cycle Detection in a Singly Linked List

Determine if a given singly linked list of integers forms a cycle or not.

A cycle in a linked list occurs when a node's next points back to a previous node in the list. T...read more

Ans.

Detect if a singly linked list forms a cycle by checking if a node's next pointer points back to a previous node.

  • Traverse the linked list using two pointers, one moving one step at a time and the other moving two steps at a time.

  • If the two pointers meet at any point, there is a cycle in the linked list.

  • Use Floyd's Cycle Detection Algorithm for efficient detection of cycles in linked lists.

Add your answer
Are these interview questions helpful?

Q7. Minimum Swaps to Sort Array Problem Statement

Given an array arr of size N, determine the minimum number of swaps required to sort the array in ascending order. The array consists of distinct elements only.

Exa...read more

Ans.

The minimum number of swaps required to sort an array of distinct elements in ascending order.

  • Use a hashmap to store the index of each element in the array.

  • Iterate through the array and swap elements to their correct positions.

  • Count the number of swaps needed to sort the array.

Add your answer

Q8. Factorial Trailing Zeros Problem

You are provided with a positive integer N. Your goal is to determine the smallest number whose factorial has at least N trailing zeros.

Example:

Input:
N = 1
Output:
5
Explanat...read more
Ans.

Find the smallest number whose factorial has at least N trailing zeros.

  • Calculate the number of 5's in the prime factorization of the factorial to determine the trailing zeros.

  • Use binary search to find the smallest number with at least N trailing zeros.

  • Consider edge cases like N = 0 or N = 1 for factorial trailing zeros problem.

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

Q9. Combination Sum Problem Statement

Given three integers X, Y, and Z, calculate the sum of all numbers that can be formed using the digits 3, 4, and 5. Each digit can be used up to a maximum of X, Y, and Z times ...read more

Ans.

Calculate the sum of all numbers that can be formed using the digits 3, 4, and 5 with given constraints.

  • Iterate through all possible combinations of 3, 4, and 5 based on the given constraints.

  • Calculate the sum of each combination and add them up.

  • Return the final sum modulo 10^9 + 7.

Add your answer

Q10. Reverse Linked List Problem Statement

Given a singly linked list of integers, your task is to return the head of the reversed linked list.

Example:

Input:
The given linked list is 1 -> 2 -> 3 -> 4 -> NULL.
Outp...read more
Ans.

To reverse a singly linked list of integers, return the head of the reversed linked list.

  • Iterate through the linked list, reversing the pointers to point to the previous node instead of the next node.

  • Keep track of the previous, current, and next nodes while traversing the list.

  • Update the head of the reversed linked list to be the last element of the original list.

Add your answer

Q11. Longest Path In Directed Graph Problem Statement

Given a Weighted Directed Acyclic Graph (DAG) comprising 'N' nodes and 'E' directed edges, where nodes are numbered from 0 to N-1, and a source node 'Src'. Your ...read more

Ans.

The task is to find the longest distances from a source node to all nodes in a weighted directed acyclic graph.

  • Implement a function that takes the number of nodes, edges, source node, and edge weights as input.

  • Use a topological sorting algorithm to traverse the graph and calculate the longest distances.

  • Return an array of integers where each element represents the longest distance from the source node to the corresponding node.

Add your answer

Q12. Largest BST Subtree Problem

Given a binary tree with 'N' nodes, determine the size of the largest subtree that is also a BST (Binary Search Tree).

Input:

The first line contains an integer 'T', representing the...read more
Ans.

The problem involves finding the size of the largest subtree that is also a Binary Search Tree in a given binary tree.

  • Traverse the binary tree in a bottom-up manner to check if each subtree is a BST.

  • Keep track of the size of the largest BST subtree encountered so far.

  • Use recursion to solve the problem efficiently.

  • Consider edge cases like empty tree or single node tree.

  • Example: For input 1 2 3 4 -1 5 6 -1 7 -1 -1 -1 -1 -1 -1, the largest BST subtree has size 3.

Add your answer

Q13. Implementing a Priority Queue Using Heap

Ninja has been tasked with implementing a priority queue using a heap data structure. However, he is currently busy preparing for a tournament and has requested your ass...read more

Ans.

Implement a priority queue using a heap data structure by completing the provided functions: push(), pop(), getMaxElement(), and isEmpty().

  • Understand the operations: push() to insert element, pop() to remove largest element, getMaxElement() to return largest element, and isEmpty() to check if queue is empty.

  • Implement a heap data structure to maintain the priority queue.

  • Handle different types of queries based on the input provided.

  • Ensure correct output for each type 3 query.

  • Te...read more

Add your answer

Q14. Ninja and Chocolates Problem Statement

Ninja is hungry and wants to eat his favorite chocolates, but his mother won't let him because he has already eaten enough. There are 'N' jars filled with chocolates. His ...read more

Ans.

Find the minimum eating speed required for a ninja to consume all chocolates within a given time limit.

  • Iterate through possible eating speeds to find the minimum speed that allows the ninja to consume all chocolates within the given time limit.

  • Calculate the total number of chocolates to be consumed and divide it by the time limit to get the minimum eating speed.

  • Handle cases where a jar has fewer chocolates than the eating speed by consuming all available chocolates from that ...read more

Add your answer

Q15. Construct the Lexicographically Largest Valid Sequence

You are provided with a positive integer N. The goal is to generate the lexicographically largest sequence of length 2*N - 1, containing integers ranging f...read more

Ans.

Generate lexicographically largest valid sequence of length 2*N - 1 with specific constraints.

  • Start with the largest numbers and place them at the ends to maximize lexicographical order.

  • Place the number 1 in the middle to satisfy the condition of appearing exactly once.

  • Determine the positions of other numbers based on their distance requirements.

  • Iterate through the sequence and fill in the numbers based on the constraints.

  • Ensure that each number from 2 to N appears exactly tw...read more

Add your answer

Q16. Zuma Game Problem Statement

You have a string of balls on the table called BOARD and several balls in your hand represented by the string hand. The balls can be of the colors red(R), blue(B), green(G), white(W)...read more

Ans.

Determine the minimum number of insertions required to empty the board in Zuma game problem.

  • Check if it's possible to empty the board by trying all possible combinations of inserting balls from hand.

  • Use backtracking algorithm to simulate the game and find the minimum number of insertions required.

  • Handle edge cases like when the board cannot be emptied or when the hand is empty.

  • Consider optimizing the algorithm by pruning branches that cannot lead to a solution.

  • Example: For BO...read more

Add your answer
Q17. What is the difference between a virtual function and an abstract class in Object-Oriented Programming?
Ans.

Virtual functions can be overridden in derived classes, while abstract classes cannot be instantiated directly.

  • Virtual functions are declared using the 'virtual' keyword and can be overridden in derived classes.

  • Abstract classes cannot be instantiated and may contain one or more pure virtual functions.

  • An abstract class can have virtual functions, but a virtual function does not make a class abstract.

  • Example: Shape is an abstract class with a pure virtual function 'calculateAre...read more

Add your answer
Q18. Design a platform similar to LinkedIn. What are the key features and architecture you would implement?
Ans.

Design a platform similar to LinkedIn with key features and architecture

  • Key Features: user profiles, connections, job postings, messaging, news feed, groups

  • Architecture: microservices, cloud storage, scalable database, AI for recommendations

  • Security: encryption, secure authentication, data privacy controls

  • User Experience: intuitive UI/UX, mobile app support, notifications

  • Monetization: premium subscriptions, advertising, job posting fees

Add your answer
Q19. Can you design a system similar to Splitwise and identify three features that you would change or improve?
Ans.

Design a system similar to Splitwise and suggest three features for improvement.

  • Implement a real-time notification system for updates on shared expenses

  • Integrate a feature for automatic currency conversion for international transactions

  • Enhance the user interface with data visualization tools for better expense tracking

Add your answer

Q20. Tell me about Asynchronous Apex? Difference between Batch Apex and Queueable Apex

Ans.

Asynchronous Apex allows you to run processes in the background, without user interaction. Batch Apex and Queueable Apex are two types of Asynchronous Apex.

  • Asynchronous Apex allows you to process large amounts of data asynchronously, without impacting the user interface.

  • Batch Apex is used to process large data sets that can be divided into smaller batches for processing.

  • Queueable Apex allows you to submit jobs for asynchronous processing, similar to future methods but with mo...read more

Add your answer

Q21. Explain Future method? and why we need (Callout= true) along with that annotation?

Ans.

Future method is used to run code asynchronously. Callout=true is needed to make HTTP callouts from future methods.

  • Future methods are used to run code asynchronously in Salesforce.

  • They are annotated with @future annotation.

  • Callout=true is needed to make HTTP callouts from future methods.

  • Without Callout=true, making HTTP callouts from future methods is not allowed.

Add your answer
Q22. Which of the HTML5 elements support media content?
Ans.

HTML5 elements that support media content include <audio>, <video>, and <source>.

  • <audio> element for audio content

  • <video> element for video content

  • <source> element for specifying multiple media resources for <video> and <audio> elements

Add your answer

Q23. Can you explain about Platform Events?

Ans.

Platform Events are a feature in Salesforce that allow developers to deliver secure, scalable, and customizable event notifications.

  • Platform Events are based on the publish-subscribe model, where publishers send events and subscribers receive them.

  • They are used to communicate changes in Salesforce data or custom events within an organization.

  • Developers can define custom event objects and trigger events using Apex or declaratively through Process Builder or Flow.

  • Subscribers ca...read more

Add your answer
Q24. How can you reduce page loading time?
Ans.

To reduce page loading time, optimize images, minify CSS and JS files, enable browser caching, use a content delivery network (CDN), and reduce server response time.

  • Optimize images by reducing file size without compromising quality

  • Minify CSS and JS files to reduce their size and improve loading speed

  • Enable browser caching to store static resources locally for faster access

  • Use a content delivery network (CDN) to distribute content across multiple servers closer to the user

  • Redu...read more

Add your answer

Q25. Data Security in Salesforce and types in it.

Ans.

Data security in Salesforce involves various types of security measures to protect sensitive information.

  • Salesforce provides various security features such as user authentication, data encryption, and access controls.

  • Types of data security in Salesforce include object-level security, field-level security, and record-level security.

  • Salesforce also offers tools like Salesforce Shield for enhanced data security and compliance.

  • Regular security audits and monitoring help ensure da...read more

Add your answer

More about working at Salesforce

#12 Best Mid-Sized Company - 2022
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at GEM Hospital And Research Center

based on 13 interviews
Interview experience
4.3
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

3.7
 • 343 Interview Questions
4.0
 • 193 Interview Questions
3.4
 • 172 Interview Questions
3.8
 • 167 Interview Questions
3.8
 • 138 Interview Questions
View all
Top Salesforce 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
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

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