Govt. Exams
Entrance Exams
With one person fixed in circular arrangement, the remaining 7 people can be arranged in 7! ways (avoiding counting rotations as different).
After Year 1: 100 × 1.25 = ₹125 crore. After Year 2: 125 × 1.20 = ₹150 crore.
The pattern is n(n+1): 1×2=2, 2×3=6, 3×4=12, 4×5=20, 5×6=30, 6×7=42. Each term is the product of consecutive integers.
Rate per worker per hour = 450/(15×6) = 5 boxes/hour. For 20 workers in 8 hours = 20×8×5 = 800 boxes.
In a balanced BST, the height is log n, so searching takes O(log n) time.
ArrayList has O(1) random access but O(n) insertion/deletion. LinkedList has O(n) access but O(1) insertion/deletion.
List list = new ArrayList();
list.add(1);
list.add(2);
list.add(3);
list.remove(1);
System.out.println(list);
list.remove(1) removes the element at index 1 (which is 2), leaving [1, 3].
Microservices allow independent scaling, deployment, and technology choices. However, they can increase operational complexity.
A hash function takes input data and produces a fixed-size output (hash value), useful for hash tables and data indexing.
String s1 = new String('Amazon');
String s2 = new String('Amazon');
System.out.println(s1 == s2);
== compares memory references. Both s1 and s2 are different objects, so it prints false. Use .equals() for value comparison.