Invest in your preparation
🎯 Drive: 25 Nov 2026
⚡ One-Stop Complete Vault
📚 LeetCode & GFG Links
⚛️ Physics & Aptitude Included
🚀 1D & 2D Kinematics — Formulas & High-Yield Derivations
Juspay Campus Core
Juspay tests physics in their 16-MCQ drill. Most questions test Kinematics, Projectiles, Newton's Laws, and Relative Velocity. Here are the exact formula cards and solved questions.
1D Motion Equations (Constant Acceleration)
v = u + at
s = ut + ½ at²
v² = u² + 2as
s_n = u + ½ a(2n - 1)
Where s_n is displacement strictly in the n-th second. Apply vector signs (+/-).
Projectile Motion (Angle θ with Horizontal)
T = (2u · sin θ) / g
H_max = (u² · sin² θ) / (2g)
R = (u² · sin 2θ) / g
R_max = u² / g (at θ = 45°)
Complementary angles (θ and 90°-θ) produce identical ranges!
Trajectory & Instantaneous Velocity
y = x·tan θ - (g·x²) / (2u²·cos² θ)
y = x·tan θ (1 - x / R)
v_top = u·cos θ (v_y = 0)
Horizontal velocity u_x = u·cos θ is strictly constant throughout flight!
Newton's Laws & Friction
f_s ≤ μ_s · N (Static)
f_k = μ_k · N (Kinetic)
a_incline = g(sin θ - μ·cos θ)
Static coefficient μ_s is strictly greater than kinetic coefficient μ_k.
Pulley Systems (Atwood Machine)
a = (m₂ - m₁)g / (m₁ + m₂)
T = 2·m₁·m₂·g / (m₁ + m₂)
Tension is uniform across massless frictionless strings.
Work, Energy, Power & Collisions
W_net = ΔKE = ½m(v² - u²)
Power = dW/dt = F · v
e = (v₂ - v₁) / (u₁ - u₂)
e=1: Elastic (KE conserved); e=0: Perfectly Inelastic (stick together, max KE lost).
🎯 Solved Juspay-Style Physics MCQs
Q1. A projectile is launched at an angle of 30° with velocity 40 m/s. What is its velocity at the highest point of its trajectory? (Take g = 10 m/s²)
Explanation: At the highest point, vertical velocity v_y = 0. However, horizontal velocity is constant: v_x = u·cos(30°) = 40 × (√3 / 2) = 20√3 ≈ 34.64 m/s. Therefore, velocity at top is 34.64 m/s directed horizontally.
Q2. Two projectiles are fired from the same point with the same speed at angles 35° and 55° with the horizontal. What is the ratio of their horizontal ranges?
Explanation: 35° and 55° are complementary angles (35° + 55° = 90°). Since sin(2(90°-θ)) = sin(180°-2θ) = sin(2θ), ranges are identical for any complementary pair fired at equal initial speed. Ratio is 1:1.
Q3. A car travelling at 20 m/s applies brakes and comes to rest in a distance of 40 m. If the same car travels at 40 m/s, what stopping distance is required under the same retarding force?
Explanation: From v² = u² - 2as, when v=0: s = u² / (2a). Thus stopping distance is proportional to u²! When speed doubles from 20 m/s to 40 m/s, stopping distance increases by 2² = 4 times. 40 m × 4 = 160 m.
Q4. Two masses m₁ = 3 kg and m₂ = 2 kg are connected by a light string over a frictionless pulley. What is the acceleration of the system? (g = 9.8 m/s²)
Explanation: Formula: a = ((m₁ - m₂) / (m₁ + m₂)) × g = ((3 - 2) / (3 + 2)) × 9.8 = 9.8 / 5 = 1.96 m/s².
🧮 Probability, Combinatorics & Quantitative Aptitude
Campus MCQ Ready
Probability Core & Bayes' Theorem
P(A ∪ B) = P(A) + P(B) - P(A ∩ B)
P(A|B) = P(A ∩ B) / P(B)
P(At least 1) = 1 - P(None)
P(A_i|B) = P(B|A_i)P(A_i) / Σ P(B|A_j)P(A_j)
For independent events: P(A ∩ B) = P(A) × P(B).
Dice Sum Distribution (2 Standard 6-Sided Dice)
Sum 7: 6/36 = 1/6 (Most likely!)
Sum 6 & 8: 5/36 each
Sum 5 & 9: 4/36 each
Sum 2 & 12: 1/36 each
Total outcomes = 36. Frequency forms symmetric triangle peaking at 7.
Combinatorics & Stars and Bars
ⁿP_r = n! / (n - r)!
ⁿC_r = n! / (r! (n - r)!)
Identical: n! / (p! · q! · r!)
Non-negative integers: C(n + r - 1, r - 1)
Circular permutations: (n - 1)!. Garlands: (n - 1)! / 2.
Derangements (No item in original spot)
D_n = n! [1 - 1/1! + 1/2! - ... + (-1)ⁿ/n!]
D₁ = 0, D₂ = 1, D₃ = 2, D₄ = 9, D₅ = 44
Probability of total derangement approaches 1/e ≈ 0.3679 for large n.
Work, Time & Mixtures (Alligation)
Together Time = (A × B) / (A + B)
Efficiency ∝ 1 / Time
(Cheaper Qty) / (Dearer Qty) = (d - m) / (m - c)
Alligation cross solves price/percentage mixture problems in under 30s.
Relative Speed & Trains
Opposite: S_rel = S₁ + S₂
Same Direction: S_rel = |S₁ - S₂|
Cross Train: Dist = L₁ + L₂
Speed in m/s = (Speed in km/h) × 5 / 18.
🎯 Solved Juspay Aptitude MCQs
Q1. A bag contains 4 red and 6 blue balls. Two balls are drawn one after another without replacement. What is the probability that both are red?
Explanation: First draw: 4/10. Second draw (no replacement): 3/9. Total = (4/10) × (3/9) = 12/90 = 2/15.
Q2. In how many ways can 4 letters be placed into 4 directed envelopes such that NO letter is placed into its correct envelope?
Explanation: This is the classic derangement problem D₄! D₄ = 4! [1/2! - 1/3! + 1/4!] = 24 [1/2 - 1/6 + 1/24] = 12 - 4 + 1 = 9.
Q3. In how many non-negative integer ways can 10 identical coins be distributed among 3 children?
Explanation: Stars and Bars formula for non-negative integers: C(n + r - 1, r - 1). Here n = 10, r = 3. C(10 + 3 - 1, 3 - 1) = C(12, 2) = (12 × 11) / 2 = 66.
💻 Operating Systems — 4 Coffman Deadlock Conditions & Synchronization
High Frequency
A deadlock can occur if and only if all four Coffman conditions hold simultaneously:
1. Mutual Exclusion
At least one non-shareable resource held by a process exclusively.
2. Hold and Wait
A process holding at least 1 resource is waiting for additional resources held by other processes.
3. No Preemption
Resources cannot be forcibly confiscated; they can only be released voluntarily by the process.
4. Circular Wait
A closed chain of processes exists: P₀ waits for P₁, P₁ waits for P₂, ..., P_n waits for P₀.
| Concept | Mutex | Counting Semaphore | Spinlock |
|---|---|---|---|
| Ownership | Strictly unlocked only by the owner thread that locked it. | Any thread can signal/post (increment value). | Acquired by polling in a tight loop. |
| Sleep / Wake | Thread sleeps; context switch occurs. | Thread sleeps if value ≤ 0. | Busy waits (uses 100% CPU core). Good only for sub-microsecond waits. |
| Use Case | Mutual exclusion of critical sections. | Resource pools (e.g. max 10 DB connections). | OS Kernel interrupt handlers where sleeping is forbidden. |
🌐 Computer Networks — TCP Handshake, TIME_WAIT & Congestion Control
Core Networking
TCP 3-Way Handshake:
Client ─── SYN (seq=x) ──────────────► Server
Client ◄── SYN-ACK (seq=y, ack=x+1) ── Server
Client ─── ACK (ack=y+1) ─────────────► Server
Why 3 packets? Both sender and receiver must reliably confirm bidirectional send and receive capabilities, and synchronize Initial Sequence Numbers (ISN).
Client ◄── SYN-ACK (seq=y, ack=x+1) ── Server
Client ─── ACK (ack=y+1) ─────────────► Server
Why is TIME_WAIT state 2 × MSL (Maximum Segment Lifetime)?
1) To allow the final ACK from client to reach server in case it is lost (if lost, server retransmits FIN, and client in TIME_WAIT can resend ACK).
2) To let any duplicate or delayed packets in the network die out so they don't corrupt a future new connection reusing the same IP:port pair.
2) To let any duplicate or delayed packets in the network die out so they don't corrupt a future new connection reusing the same IP:port pair.
🗄️ DBMS — ACID, Isolation Levels & Indexing B+ Trees
DBMS Core
| Isolation Level | Dirty Read | Non-Repeatable Read | Phantom Read |
|---|---|---|---|
| Read Uncommitted | ⚠️ Permitted | ⚠️ Permitted | ⚠️ Permitted |
| Read Committed | 🛡️ Prevented | ⚠️ Permitted | ⚠️ Permitted |
| Repeatable Read | 🛡️ Prevented | 🛡️ Prevented | ⚠️ Permitted (Standard SQL) |
| Serializable | 🛡️ Prevented | 🛡️ Prevented | 🛡️ Prevented |
Why B+ Tree over B-Tree for Database Indexing?
1) Range Queries: In a B+ Tree, all data records/pointers are stored exclusively in leaf nodes, and leaf nodes are linked in a continuous doubly-linked list. Scanning ranges requires traversing the leaves directly without ascending back up.
2) Higher Branching Factor: Internal nodes store only keys and pointers (no data payloads), meaning many more keys fit into a single disk page, dramatically reducing tree height and disk I/O operations!
2) Higher Branching Factor: Internal nodes store only keys and pointers (no data payloads), meaning many more keys fit into a single disk page, dramatically reducing tree height and disk I/O operations!
☕ Java Fast I/O Template (Crucial for Juspay OA: N, Q ≤ 2×10⁵)
Java High Performance
java.util.Scanner parses via regex and synchronizes internally. For 2×10⁵ integers, Scanner takes > 1.4 seconds (causing TLE). Use this zero-overhead FastScanner template which completes in < 0.08s:
import java.io.*;
import java.util.*;
public class Solution {
static class FastScanner {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer("");
String next() {
while (!st.hasMoreTokens()) {
try {
String line = br.readLine();
if (line == null) return null;
st = new StringTokenizer(line);
} catch (IOException e) {
e.printStackTrace();
}
}
return st.nextToken();
}
int nextInt() {
return Integer.parseInt(next());
}
long nextLong() {
return Long.parseLong(next());
}
}
public static void main(String[] args) {
FastScanner fs = new FastScanner();
PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
// Example: Reading N, M, K
// int N = fs.nextInt();
out.flush();
}
}