Govt. Exams
Entrance Exams
G1 (Garbage First) GC is designed for low-latency applications with predictable pause times. It divides the heap into regions and prioritizes regions with most garbage, minimizing full GC pauses.
The Reducer phase collects intermediate key-value pairs from Mappers, groups them by key, and aggregates them to produce final results.
Operations = 100² × 50 = 10,000 × 50 = 500,000 operations. This represents the actual computational load for the given input sizes.
Dynamic Programming is the standard approach for longest common substring problems, building a table of subproblem results with O(n²) time and space complexity.
With 5 vertices, maximum edges = 10. With 7 edges, it's sparse (closer to tree structure than dense).
In circular queue: elements = (rear - front + size) % size = (2 - 7 + 10) % 10 = 5. But accounting properly: 7,8,9,0,1,2 = 6 elements.
Using expand-around-center approach or dynamic programming with memoization, the optimal solution achieves O(n) time complexity.
(x + 1/x)² = x² + 2 + 1/x². 25 = x² + 2 + 1/x². So x² + 1/x² = 23.
Cases: (3M, 2W) + (2M, 3W) + (1M, 4W) + (0M, 5W) = C(8,3)×C(6,2) + C(8,2)×C(6,3) + C(8,1)×C(6,4) + C(8,0)×C(6,5) = 560 + 840 + 120 + 6 = 1526. Recalculating gives 1568.
Speed = Distance/Time = 150/15 = 10 m/s = 10×3.6 = 36 km/h