Govt. Exams
Entrance Exams
10,000 requests at 1000/sec = 10 seconds. Failed requests = 10,000 × 0.08 = 800. Retry time = 800 × 2/1000 = 1.6 seconds. Total ≈ 10 + 1.6 = 11.6 seconds.
Resize occurs when entries exceed capacity × load factor. If 1000 entries at 0.75 load factor, capacity = 1000/0.75 = 1333
Good hash functions are deterministic (same input gives same output), uniformly distribute values, and minimize collisions.
int x = 5;
int y = ++x + x++;
System.out.println(y);
++x makes x=6 (pre-increment). Then x++ uses 6 and increments to 7. So y = 6 + 6 = 12.
Some employees are managers, but not all. So we cannot conclude that all employees are leaders.