Add office photos
Engaged Employer

JPMorgan Chase & Co.

4.0
based on 6.1k Reviews
Video summary
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by

400+ Health And Diet Interview Questions and Answers

Updated 9 Feb 2025
Popular Designations

Q1. Split Binary String Problem Statement

Chintu has a long binary string str. A binary string is a string that contains only 0 and 1. He considers a string to be 'beautiful' if and only if the number of 0's and 1'...read more

Add your answer

Q2. A rat has 3000 gm of rice, he has to travel a distance of 3000m, he eats 1gm rice/m, his maximum carrying capcity is 1000 gm,how should he travel the distance to reach with maximum rice left

Ans.

A rat with 3000gm rice, 3000m distance, 1gm rice/m, 1000gm capacity. How to reach with max rice left?

  • The rat should carry maximum rice possible in the beginning

  • The rat should eat rice only when necessary

  • The rat should carry rice in intervals to avoid exhaustion

  • The rat should calculate the amount of rice needed for the journey

  • The rat should prioritize reaching the destination over carrying excess rice

View 4 more answers

Q3. Rahul And Minimum Subarray Problem Statement

Rahul is mastering arrays. He is tasked to find the length of the smallest contiguous subarray in a given array/list ARR of size N, such that its sum exceeds a speci...read more

Add your answer

Q4. There are 8 bottles of milk out of which one bottle is poisoned. What will be the minimum number of persons required to find the poisoned bottle if the person dies within 24 hours of drinking the poison. You ha...

read more
Ans.

Minimum number of persons required to find the poisoned milk bottle out of 8 bottles within 24 hours.

  • Divide the bottles into groups of 3 and label them A, B, C.

  • Give each person a different combination of groups to taste.

  • If someone dies, the poisoned bottle is in that group.

  • If no one dies, the poisoned bottle is in group D.

  • Repeat the process with the bottles in the identified group.

View 5 more answers
Discover Health And Diet interview dos and don'ts from real experiences

Q5. Reverse Words in a String: Problem Statement

You are given a string of length N. Your task is to reverse the string word by word. The input may contain multiple spaces between words and may have leading or trai...read more

Add your answer

Q6. Minimum Travel Cost Problem

You are given a country called 'Ninjaland' with 'N' states, numbered from 1 to 'N'. These states are connected by 'M' bidirectional roads, each with a specified travel cost. The aim ...read more

Add your answer
Are these interview questions helpful?

Q7. Merge Overlapping Intervals Problem Statement

Given a specified number of intervals, where each interval is represented by two integers denoting its boundaries, the task is to merge all overlapping intervals an...read more

Add your answer

Q8. Left View of a Binary Tree Problem Statement

Given a binary tree, your task is to print the left view of the tree.

Example:

Input:
The input will be in level order form, with node values separated by a space. U...read more
Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. Subset Sum Equal To K Problem Statement

Given an array/list of positive integers and an integer K, determine if there exists a subset whose sum equals K.

Provide true if such a subset exists, otherwise return f...read more

Add your answer

Q10. Excel Column Number Conversion

Given a column title as it appears in an Excel sheet, your task is to return its corresponding column number.

Example:

Input:
S = "AB"
Output:
28
Explanation:

The sequence is as f...read more

Add your answer

Q11. LRU Cache Design Question

Design a data structure for a Least Recently Used (LRU) cache that supports the following operations:

1. get(key) - Return the value of the key if it exists in the cache; otherwise, re...read more

Add your answer

Q12. Next Greater Element Problem Statement

You are given an array arr of length N. For each element in the array, find the next greater element (NGE) that appears to the right. If there is no such greater element, ...read more

Add your answer

Q13. Count Subarrays with Sum Divisible by K

Given an array ARR and an integer K, your task is to count all subarrays whose sum is divisible by the given integer K.

Input:

The first line of input contains an integer...read more
Add your answer

Q14. Longest Increasing Path in Matrix Problem Statement

Given a 2-D matrix mat with 'N' rows and 'M' columns, where each element at position (i, j) is mat[i][j], determine the length of the longest increasing path ...read more

Add your answer

Q15. How will you perform pre-fix and post-fix operation for the given string expression?

Ans.

Pre-fix and post-fix operations can be performed on a string expression using appropriate operators.

  • Pre-fix operation involves placing the operator before the operand in the expression.

  • Post-fix operation involves placing the operator after the operand in the expression.

  • Examples of pre-fix operators include ++, --, !, and ~.

  • Examples of post-fix operators include ++ and --.

View 2 more answers

Q16. Maximum Number by One Swap

You are provided with an array of N integers representing the digits of a number. You are allowed to perform an operation where you can swap the values at two different indices to for...read more

Add your answer

Q17. Make Array Elements Equal Problem Statement

Given an integer array, your objective is to change all elements to the same value, minimizing the cost. The cost of changing an element from x to y is defined as |x ...read more

Add your answer

Q18. Top View of Binary Tree

Given a binary tree of integers, the task is to return the top view of the given binary tree. The top view of the binary tree is the set of nodes visible when viewed from the top.

Input:...read more

Add your answer

Q19. A new software has 3 functions SelectSum(), log() and exp(). You have a table of 1000 data points, how will you find product of all points using only the above mentioned functions

Ans.

To find the product of all data points using SelectSum(), log(), and exp() functions.

  • Use the log() function to convert the product into a sum of logarithms

  • Apply the SelectSum() function to calculate the sum of logarithms

  • Finally, use the exp() function to convert the sum back into the product

Add your answer

Q20. Intersection of Linked List Problem

You are provided with two singly linked lists containing integers, where both lists converge at some node belonging to a third linked list.

Your task is to determine the data...read more

Add your answer

Q21. Write an algorithm to select the number between min and maximum from a number series and that number shouldn't be a multiple of 10

Ans.

Algorithm to select a non-multiple of 10 from a number series between min and max

  • Loop through the number series from min to max

  • Check if the current number is a multiple of 10

  • If not, select the number and exit the loop

  • If all numbers are multiples of 10, return an error message

View 2 more answers

Q22. Shortest Path in a Binary Matrix Problem Statement

Given a binary matrix of size N * M where each element is either 0 or 1, find the shortest path from a source cell to a destination cell, consisting only of 1s...read more

Add your answer

Q23. Find Permutation Problem Statement

Given an integer N, determine an array of size 2 * N that satisfies the following conditions:

  1. Each number from 1 to N appears exactly twice in the array.
  2. The distance between...read more
Add your answer

Q24. 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
Add your answer

Q25. How will you find loop in the circular linked list?

Ans.

Loop in a circular linked list can be found using Floyd's cycle-finding algorithm.

  • Initialize two pointers, slow and fast, both pointing to the head of the linked list.

  • Move slow pointer by one node and fast pointer by two nodes in each iteration.

  • If there is a loop, both pointers will eventually meet at some point.

  • If there is no loop, fast pointer will reach the end of the linked list.

  • Time complexity of this algorithm is O(n) and space complexity is O(1).

View 1 answer

Q26. Pair Sum Problem Statement

You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to find and return a list of all pairs of elements where each sum of a pair equals 'S'.

Note:

Each pa...read more

Add your answer

Q27. Pattern Matching Problem Statement

Given a pattern as a string and a set of words, determine if the pattern and the words list align in the same sequence.

Input:
T (number of test cases)
For each test case:
patte...read more
Add your answer

Q28. Divide Linked List Into Two Problem Statement

You have been given a singly linked list of integers. Your task is to divide this list into two smaller singly linked lists wherein the nodes appear in an alternati...read more

Add your answer

Q29. Rectangle Counting on an N x N Chessboard

Given a positive integer N, determine the number of possible rectangles that can be formed on an N x N chessboard, excluding squares.

Input:

The first line contains an ...read more
Add your answer

Q30. Rearrange Words in a Sentence

You are provided with a sentence 'TEXT'. Each word in the sentence is separated by a single space, and the sentence starts with a capital letter. Your task is to rearrange the word...read more

Add your answer

Q31. 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
Add your answer

Q32. Sudoku Solver Problem Statement

You are provided with a 9x9 2D integer matrix MAT representing a Sudoku puzzle. The empty cells in the Sudoku are denoted by zeros, while the other cells contain integers from 1 ...read more

Add your answer

Q33. Sudoku Validity Problem Statement

You are provided with a 9 x 9 2D matrix MATRIX containing digits (1-9) and empty cells indicated by 0.

Your task is to determine if there exists a method to fill all empty cell...read more

Add your answer

Q34. Paths in a Matrix Problem Statement

Given an 'M x N' matrix, print all the possible paths from the top-left corner to the bottom-right corner. You can only move either right (from (i,j) to (i,j+1)) or down (fro...read more

Add your answer

Q35. Chocolate Bar Problem Statement

You are given a chocolate bar represented as a grid with dimensions N x M. Your task is to cut the chocolate bar, either horizontally or vertically, to obtain exactly 'K' pieces....read more

Add your answer

Q36. What are the different types of risks associated with a bond?

Ans.

Different types of risks associated with a bond

  • Interest rate risk - changes in interest rates affect bond prices

  • Credit risk - risk of default by the issuer

  • Inflation risk - risk of loss of purchasing power due to inflation

  • Liquidity risk - risk of not being able to sell the bond when needed

  • Call risk - risk of the issuer calling back the bond before maturity

  • Reinvestment risk - risk of not being able to reinvest the coupon payments at the same rate

  • Currency risk - risk of changes ...read more

Add your answer
Q37. What is a lambda expression in Java, and how does it relate to a functional interface?
Add your answer

Q38. Problem: Sort an Array of 0s, 1s, and 2s

Given an array/list ARR consisting of integers where each element is either 0, 1, or 2, your task is to sort this array in increasing order.

Input:

The input starts with...read more
Add your answer

Q39. Pascal's Triangle Construction

You are provided with an integer 'N'. Your task is to generate a 2-D list representing Pascal’s triangle up to the 'N'th row.

Pascal's triangle is a triangular array where each el...read more

Add your answer

Q40. Kth Largest Number Problem Statement

You are given a continuous stream of numbers, and the task is to determine the kth largest number at any moment during the stream.

Explanation:

A specialized data structure ...read more

Add your answer

Q41. Stack using Two Queues Problem Statement

Develop a Stack Data Structure to store integer values using two Queues internally.

Your stack implementation should provide these public functions:

Explanation:

1. Cons...read more
Add your answer

Q42. Write the algorithm for reversing the string

Ans.

The algorithm reverses a given string.

  • Iterate through the string from the last character to the first character.

  • Append each character to a new string or an array in reverse order.

  • Return the reversed string or array.

View 3 more answers

Q43. LRU Cache Problem Statement

Design and implement a data structure for the Least Recently Used (LRU) Cache to efficiently support the following operations:

  1. get(key): Retrieve the value of the key if it exists i...read more
Add your answer

Q44. Fastest Horse Problem Statement

Given ‘N’ horses running in separate lanes, each horse's finish time is provided in an array. You are tasked to process 'Q' queries. For each query, determine the time taken by t...read more

Add your answer

Q45. Arithmetic Progression Queries Problem Statement

Given an integer array ARR of size N, perform the following operations:

- update(l, r, val): Add (val + i) to arr[l + i] for all 0 ≤ i ≤ r - l.

- rangeSum(l, r):...read more

Add your answer
Q46. What is the probability of obtaining a sum of 22 or more when four dice are thrown?
Add your answer

Q47. Next Greater Number Problem Statement

Given a string S which represents a number, determine the smallest number strictly greater than the original number composed of the same digits. Each digit's frequency from...read more

Add your answer

Q48. Merge Two Sorted Linked Lists Problem Statement

You are provided with two sorted linked lists. Your task is to merge them into a single sorted linked list and return the head of the combined linked list.

Input:...read more

Add your answer

Q49. Distance Between Two Nodes in a Binary Tree

Given a binary tree and the values of two distinct nodes, determine the distance between these two nodes in the tree. The distance is defined as the minimum number of...read more

Add your answer

Q50. Longest Palindromic Substring Problem Statement

You are provided with a string STR of length N. The goal is to identify the longest palindromic substring within this string. In cases where multiple palindromic ...read more

Add your answer

Q51. Find Minimum Depth of Binary Tree

You are given a Binary Tree of integers. Your task is to determine the minimum depth of this Binary Tree. The minimum depth is defined as the number of nodes along the shortest...read more

Add your answer

Q52. Shortest Path in an Unweighted Graph

The city of Ninjaland is represented as an unweighted graph with houses and roads. There are 'N' houses numbered 1 to 'N', connected by 'M' bidirectional roads. A road conne...read more

Add your answer

Q53. Most Frequent Non-Banned Word Problem Statement

Given a paragraph consisting of letters in both lowercase and uppercase, spaces, and punctuation, along with a list of banned words, your task is to find the most...read more

Add your answer

Q54. Count Subarrays with Given XOR Problem Statement

You are given an array of integers ARR and an integer X. Your task is to determine the number of subarrays of ARR whose bitwise XOR is equal to X.

Example:

Input...read more
Add your answer

Q55. Count Distinct Substrings

You are provided with a string S. Your task is to determine and return the number of distinct substrings, including the empty substring, of this given string. Implement the solution us...read more

Add your answer

Q56. Counting Pairs Problem Statement

Given a positive integer N, determine the count of all possible positive integral pairs (X, Y) that satisfy the equation 1/X + 1/Y = 1/N.

Example:

Input:
T = 1
N = 2
Output:
3
Ex...read more
Add your answer

Q57. Populating Next Right Pointers in Each Node

Given a complete binary tree with 'N' nodes, your task is to determine the 'next' node immediately to the right in level order for each node in the given tree.

Input:...read more

Add your answer

Q58. Remove the Kth Node from the End of a Linked List

You are given a singly Linked List with 'N' nodes containing integer data and an integer 'K'. Your task is to delete the Kth node from the end of this Linked Li...read more

Add your answer

Q59. How do you handle custom exceptions in your current project ?

Ans.

I handle custom exceptions by creating my own exception classes and throwing them when necessary.

  • I create custom exception classes that extend the built-in Exception class

  • I throw these exceptions when specific errors occur in my code

  • I catch these exceptions in a try-catch block and handle them appropriately

  • I include helpful error messages in my custom exceptions to aid in debugging

Add your answer

Q60. Merge Intervals Problem Statement

You are provided with 'N' intervals, each containing two integers denoting the start time and end time of the interval.

Your task is to merge all overlapping intervals and retu...read more

Add your answer

Q61. If I buy a piece of equipment, walk me through the impact on the 3 financial statements

Ans.

Buying equipment affects all 3 financial statements

  • On the income statement, the purchase will be recorded as an expense, reducing net income

  • On the balance sheet, the equipment will be recorded as an asset, increasing total assets

  • On the cash flow statement, the purchase will be recorded as a cash outflow from investing activities

Add your answer

Q62. Sort Elements by Frequency

Your task is to sort a list of repeated integers by their frequency in decreasing order. The element with the highest frequency should appear first. If two elements have the same freq...read more

Add your answer
Q63. What do you understand by autowiring in Spring Boot, and can you name the different modes of it?
Add your answer
Q64. What are the start() and run() methods of the Thread class in Java?
Add your answer

Q65. Explain endpoints in your microservice. What request they send and why?

Ans.

Endpoints in microservices are responsible for handling incoming requests and sending responses.

  • Endpoints are the entry points for a microservice

  • They handle incoming requests and send responses

  • Endpoints can be HTTP endpoints, message queue endpoints, or event-driven endpoints

  • Examples of endpoints include RESTful APIs, SOAP APIs, and GraphQL APIs

Add your answer

Q66. what is 'Big data'? Why is it called 'Big'

Ans.

Big data refers to large and complex data sets that cannot be processed using traditional data processing methods.

  • Big data is characterized by its volume, velocity, and variety

  • It is used in various industries such as healthcare, finance, and retail

  • Examples of big data include social media data, sensor data, and transactional data

  • It is called 'big' because it involves processing massive amounts of data

  • Big data requires specialized tools and technologies for processing and anal...read more

Add your answer
Q67. What is the main difference between UNION and UNION ALL?
Add your answer

Q68. With O(1) time complexity, find out if the given number is missing, from the given numbers between 1 to 100 where more than 2 numbers are missing.

Ans.

To find a missing number from 1 to 100 with O(1) time complexity.

  • Use the formula n(n+1)/2 to find the sum of numbers from 1 to 100.

  • Subtract the sum of given numbers from the sum of all numbers to find the missing number.

  • Use a hash table to keep track of the given numbers and check for missing numbers in O(1) time.

View 2 more answers

Q69. What is compliance and different compliance measures maintained

Ans.

Compliance refers to adhering to laws, regulations, and standards set by governing bodies.

  • Compliance measures ensure that organizations operate within legal and ethical boundaries

  • Examples of compliance measures include HIPAA, GDPR, PCI DSS, and SOX

  • Compliance can be achieved through policies, procedures, training, audits, and assessments

  • Non-compliance can result in legal and financial penalties, damage to reputation, and loss of business

Add your answer
Q70. What does the @SpringBootApplication annotation do internally?
Add your answer
Q71. What are the basic annotations that Spring Boot offers?
Add your answer
Q72. What is the difference between the Thread class and the Runnable interface when creating a thread in Java?
Add your answer

Q73. What is the most complex algorithm you've ever written?

Ans.

I am an AI language model and do not have the ability to write algorithms.

  • As an AI language model, I am not capable of writing algorithms.

  • However, I can assist in generating code snippets or providing guidance on algorithmic concepts.

  • Feel free to ask me any questions related to algorithms or programming in general.

Add your answer
Q74. What do you mean by virtual functions in C++?
Add your answer

Q75. What is the difference between multi tasking, multi processing and multi programming operating systems with examples ?

Ans.

Multi tasking, multi processing, and multi programming are different approaches to managing tasks in an operating system.

  • Multi tasking allows multiple tasks to run concurrently on a single processor.

  • Multi processing involves multiple processors running tasks simultaneously.

  • Multi programming allows multiple programs to be loaded into memory and executed concurrently.

  • Examples of multi tasking operating systems include Windows, macOS, and Linux.

  • Examples of multi processing opera...read more

Add your answer
Q76. What is the difference between a clustered index and a non-clustered index?
Ans.

Clustered index determines the physical order of data in a table, while non-clustered index has a separate structure.

  • Clustered index determines the physical order of data in a table

  • Non-clustered index has a separate structure that includes a copy of the indexed columns and a pointer to the actual data

  • A table can have only one clustered index, but multiple non-clustered indexes

  • Clustered index is faster for retrieving large ranges of data, while non-clustered index is faster fo...read more

Add your answer
Q77. What is the difference between 'git pull' and 'git fetch'?
Ans.

Git pull combines git fetch and git merge, while git fetch only downloads new data from a remote repository.

  • Git pull is used to update the local branch with the latest changes from the remote repository.

  • Git fetch only downloads new data from the remote repository, but does not integrate it into the local branch.

  • Git pull is a combination of git fetch and git merge commands.

  • Git fetch is useful to see what changes have been made in the remote repository before merging them into ...read more

Add your answer
Q78. What is the garbage collector in Java?
Add your answer
Q79. What is meant by inheritance in object-oriented programming?
Add your answer
Q80. What are the different methods of session management in Servlets?
Ans.

Different methods of session management in Servlet

  • Cookies

  • URL Rewriting

  • Hidden Form Fields

  • Session Tracking API

  • HTTP Session

Add your answer
Q81. How can you optimize the loading of website assets?
Ans.

Optimize website assets loading by minimizing file sizes, leveraging caching, and using asynchronous loading.

  • Minimize file sizes by compressing images, minifying CSS and JavaScript files

  • Leverage caching by setting appropriate cache headers and using a content delivery network (CDN)

  • Use asynchronous loading techniques such as lazy loading, deferred loading, and async/defer attributes

  • Combine and bundle multiple files to reduce the number of requests

  • Optimize the order of loading ...read more

Add your answer

Q82. Any coding done in curriculum, explain the most complex one

Ans.

Yes, I have coded in curriculum. The most complex one was a project on building a web application using React and Node.js.

  • Built a full-stack web application using React and Node.js

  • Implemented user authentication and authorization using JSON Web Tokens (JWT)

  • Used MongoDB as the database and Mongoose as the ODM

  • Implemented real-time updates using Socket.IO

  • Deployed the application on Heroku

  • Handled errors and implemented logging using Winston

Add your answer
Q83. What are the new tags for media elements introduced in HTML5?
Ans.

New tags in Media Elements in HTML5 include <audio> and <video>.

  • <audio> tag for audio content

  • <video> tag for video content

  • Attributes like controls, autoplay, loop, etc. can be used with these tags

Add your answer

Q84. Will duration be greater for a fixed rate bond or a floating rate bond?

Ans.

Duration will be greater for a fixed rate bond.

  • Fixed rate bonds have a longer duration than floating rate bonds.

  • Duration is the measure of a bond's sensitivity to interest rate changes.

  • Fixed rate bonds have a fixed interest rate, so their duration is longer as they are more sensitive to interest rate changes.

Add your answer

Q85. Explain how the balance sheet works for banking sector

Ans.

The balance sheet for banking sector shows the assets, liabilities and equity of the bank at a specific point in time.

  • Assets include cash, loans, investments, and property

  • Liabilities include deposits, loans from other banks, and bonds

  • Equity includes the bank's capital and reserves

  • The balance sheet must balance, with assets equaling liabilities plus equity

  • The balance sheet is used to analyze the financial health of the bank

View 1 answer
Q86. How does Spring Boot work?
Ans.

Spring Boot is a framework that simplifies the development of Java applications by providing default configurations and dependencies.

  • Spring Boot eliminates the need for manual configuration by providing sensible defaults.

  • It uses an embedded server, such as Tomcat or Jetty, to run the application.

  • Spring Boot automatically configures the application based on the dependencies added to the project.

  • It promotes convention over configuration, reducing boilerplate code.

  • Spring Boot su...read more

Add your answer
Q87. What is CORS in MVC and how does it work?
Ans.

CORS in MVC is Cross-Origin Resource Sharing, a mechanism that allows restricted resources on a web page to be requested from another domain.

  • CORS is a security feature implemented in web browsers to prevent cross-origin requests by default.

  • It works by adding specific HTTP headers to the server's response, indicating which origins are allowed to access the resources.

  • In MVC, CORS can be configured using the 'EnableCors' attribute on controllers or by configuring it in the 'Web....read more

Add your answer
Q88. What are the advantages of web services?
Ans.

Web services offer advantages such as interoperability, scalability, reusability, and platform independence.

  • Interoperability: Web services allow different applications to communicate and share data regardless of the programming languages or platforms they are built on.

  • Scalability: Web services can handle a large number of requests and can be easily scaled up or down to meet changing demands.

  • Reusability: Web services promote code reuse as they can be accessed by multiple appli...read more

Add your answer

Q89. What caused the 2008 financial crisis?

Ans.

The 2008 financial crisis was caused by a combination of factors including subprime mortgages, risky investments, and lack of regulation.

  • Subprime mortgages were given to borrowers who were not creditworthy and could not afford to repay the loans.

  • These mortgages were then bundled together and sold as securities to investors, who were not aware of the high risk involved.

  • Investment banks also made risky investments and used excessive leverage, which led to their collapse.

  • The lac...read more

Add your answer

Q90. What is hashmap? Where it is used? What is the time complexity to implement it?

Ans.

HashMap is a data structure that stores key-value pairs and provides constant time complexity for basic operations.

  • HashMap is used to store and retrieve data based on unique keys.

  • It is commonly used in programming languages to implement associative arrays or dictionaries.

  • The time complexity to implement a HashMap is O(1) for basic operations like insertion, deletion, and retrieval.

Add your answer
Q91. What is meant by multitasking and multithreading in operating systems?
Add your answer
Q92. Design a URL shortener.
Add your answer

Q93. You have two threads one printing even numbers in order and other odd numbers. Design an algorithm so that it prints numbers in natural order?

Ans.

Use a shared variable and synchronization mechanisms to ensure natural order printing of numbers.

  • Create two threads, one for printing even numbers and the other for printing odd numbers.

  • Use a shared variable to keep track of the current number to be printed.

  • Implement synchronization mechanisms like locks or semaphores to ensure only one thread can access the shared variable at a time.

  • Each thread should check if it is its turn to print the number based on the parity of the cur...read more

Add your answer

Q94. 50 red marbles, 50 blue marbles. 2 jars in a room. Divide the marbles into the 2 jars such that you maximise the probability that a blind man picks up a red marble

Ans.

To maximize the probability of picking a red marble, divide the marbles unevenly, with more red marbles in one jar.

  • Place 49 red marbles and 1 blue marble in one jar, and the remaining 1 red marble and 49 blue marbles in the other jar.

  • This way, the blind man has a higher chance of picking the jar with 49 red marbles and 1 blue marble.

  • The probability of picking a red marble from the first jar is 49/50, while from the second jar it is 1/50.

View 1 answer
Q95. What are virtual destructors in C++?
Add your answer

Q96. What is the probability that three unbiased dices to roll such that a&gt;b&gt;c. Extrapolate to five random number generators (1 to n)

Ans.

Probability of rolling three unbiased dices such that a>b>c and extrapolating to five random number generators.

  • The probability of rolling three unbiased dices such that a>b>c is 1/216.

  • To extrapolate to five random number generators, we need to calculate the probability of generating five random numbers such that the first is greater than the second, the second is greater than the third, and so on.

  • The probability of generating five random numbers such that the first is greater...read more

Add your answer

Q97. Is data quality more important or is timeliness?

Ans.

Both data quality and timeliness are important, but it depends on the specific use case.

  • Data quality is crucial for decision-making and analysis, as inaccurate data can lead to incorrect conclusions.

  • Timeliness is important for real-time decision-making and time-sensitive operations.

  • In some cases, data quality may be more important, such as in medical research where accuracy is critical.

  • In other cases, timeliness may be more important, such as in financial trading where split-...read more

Add your answer

Q98. Where transactional can be used in microservices ?

Ans.

Transactional can be used in microservices to ensure data consistency and integrity.

  • Transactional mechanisms can be used to ensure that all microservices involved in a transaction either commit or rollback together.

  • Transactional boundaries can be defined to ensure that all data changes within a transaction are atomic and consistent.

  • Transactional messaging can be used to ensure that messages are delivered exactly once and in the correct order.

  • Examples of transactional systems ...read more

Add your answer
Q99. What is a thread in Java?
Add your answer
Q100. Can you explain the SOLID principles in Object-Oriented Design?
Add your answer
1
2
3
4
5

More about working at JPMorgan Chase & Co.

Top Rated Mega Company - 2024
Top Rated Company for Women - 2024
Top Rated Financial Services Company - 2024
HQ - New York, New York, United States (USA)
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Health And Diet

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

Top Interview Questions from Similar Companies

3.9
 • 361 Interview Questions
3.7
 • 343 Interview Questions
3.6
 • 338 Interview Questions
3.6
 • 174 Interview Questions
4.1
 • 156 Interview Questions
4.2
 • 146 Interview Questions
View all
Top JPMorgan Chase & Co. 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

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