Question
"A piggy bank comprises 5-rupee coins, 10-rupee coins,
and 20-rupee coins. The quantity of 5-rupee coins in the piggy bank is 75% more than the number of 20-rupee coins and 30% less than the number of 10-rupee coins. If two coins are randomly drawn from the piggy bank, the probability of drawing a 5-rupee coin and a 10-rupee coin is 1/3. Determine the total number of coins in the piggy bank."Solution
ATQ, Let the number of 10 rupees coins in the piggy bank be 'p'. So, the number of 5 rupeees coins in the piggy bank = 0.7p And the number of 20 rupees coins in the piggy bank = 0.70/1.75 = 0.4p So, the total number of coins in the piggy bank = p + 0.7p + 0.4p = 2.1p So, the probability that a 5 rupees coins and a 10 rupees coins are drawn = pC1 × 0.7pC1/ 2.1pC2 = 1/3 (2p × 0.7p) / {2.1p (2.1p - 1) } = 1/3 2.1p - 1 = 2p 0.1p = 1, p = 10 So, the total number of coins in the piggy bank = 2.1 × 10 = 21
Complete the Java code to replace all occurrences of a specific word (case-insensitive) in a string.
public class RegexReplacer {
  pu...
What is the typical time complexity for removing the highest-priority element (using poll()) from a java.util.PriorityQueue with N elements?
 �...
What is the defining property of a Binary Search Tree (BST)?
Router is responsible for packet forwarding, including routing. Router works at which layer?
What is a key characteristic regarding negative edge weights in the Floyd-Warshall algorithm?
Which of the following is a primary advantage of a microservices architecture compared to a monolithic architecture?Â
Which of the following accurately describes Type 1 hypervisor virtualization?Â
In a multithreaded environment, which of the following synchronization mechanisms is used to prevent race conditions?Â
The precision is composed of which of the following two characteristics?
Dynamic Programming is typically used for problems that exhibit which two main properties?