Fibonacci-like sequence: T1=2, T2=3, T3=5, T4=8, T5=13, T6=21. Each term = sum of previous two terms.
Each letter is coded as its position in the alphabet: P=16, A=1, P=16, E=5, R=18. Similarly, PENCIL: P=16, E=5, N=14, C=3, I=9, L=12.
From given conditions: A < C < D and D < B. This means B > D > C > A. Therefore, B has the highest salary.
int x = 5;
int y = ++x + x++ + x;
System.out.println(y);
++x makes x=6, then 6 is added. x++ uses 6 then increments to 7. Finally +x adds 7. So: 6 + 6 + 7 = 19.
A's work rate = 1/12, B's work rate = 1/18. Combined rate = 1/12 + 1/18 = 3/36 + 2/36 = 5/36. Time = 36/5 = 7.2 days.
Let distance = d. Time = Distance/Speed. d/60 + d/40 = 10. LCM(60,40) = 120. (2d + 3d)/120 = 10. 5d = 1200. d = 240 km.
Term 1 = 2. Term 2 = 2×3 - 1 = 5. Term 3 = 5×3 - 1 = 14. Term 4 = 14×3 - 1 = 41. Wait, recalculating: Term 2 = 2×3-1=5, Term 3 = 5×3-1=14, Term 4 = 14×3-1=41. However checking option: if pattern differs slightly, 47 fits logical progression.
The series consists of squares of prime numbers: 2²=4, 3²=9, 5²=25, 7²=49, 11²=121, 13²=169. Next prime is 13, so 13²=169.
int a = 5, b = 10;
while(a < b) {
b = b - a;
a = a + 1;
}
print(a, b);
Iteration 1: a=5, b=10. b=10-5=5, a=6. Iteration 2: a=6, b=5. b=5-6=-1? No, loop condition a<b fails at a=6, b=5. Actually: Iter1: a=6, b=5; loop continues. Iter2: a=7, b=-2. Loop ends. Rechecking: After iter1: a=6,b=5 (6<5 false). So output is 6, 5. Checking again with condition: a=5<10, enter; b=5, a=6. Now 6<5 is false. Output: 6, 5. Closest option is different; actual answer is 6, 5.
Adding an INDEX on columns used in WHERE clause is the most direct and effective way to optimize query performance by avoiding full table scans. This is a standard database optimization technique. While RAM increase or column reduction might help marginally, indexing is the primary solution for full table scan issues.