Question
There is enough food in a camp to last for 25 days if
each of the 40 soldiers present at the camp eat 4 times a day. After 15 days, 20 soldiers left the camp and remaining ate only twice a day. For how many days (from start) will the food last?Solution
Let the eating capacity of each soldier be 'x' units So, total food at the camp = (25 X 40 X 4 X x) = '4000x' units And food remaining after 15 days = 4000x - (15 X 40 X 4 X x) = '1600x' units So, required time = 1600x ÷ (x X 2 X 20) = 40 days So, the food will last for a total of 40 + 15 = 55 days
Transfer function of closed loop system with negative feedback is defined as___
What happens if a subclass does not explicitly call a superclass constructor?
What is the primary function of a router in a network?Â
Consider a graph with vertices A, B, C, D and edges with weights: (A,B)=1, (A,C)=7, (A,D)=10, (B,C)=3, (C,D)=4, (D,E)=2. (Assume E is another vertex). I...
What is the typical time complexity for inserting an element into a java.util.PriorityQueue with N elements?
  import java.util.PriorityQueue...
What is the best case time complexity of merge sort?
Using a bottom-up dynamic programming approach to calculate the 6th Fibonacci number (F(0)=0, F(1)=1), what are the values stored in the DP table F at i...
In a multithreaded environment, which of the following synchronization mechanisms is used to prevent race conditions?Â
What is a common disadvantage of greedy algorithms?
Complete the recurrence relation for dp[i][j] in the Longest Common Subsequence (LCS) problem when text1[i-1] is *not equal* to text2[j-1].
# dp[...