Skip to content
RED SAG Skills

Hard Backend Developer questions

483 questions · 20 points each for a correct first answer.

  1. 1.Safe retries for paymentshard
  2. 2.CAP during a network partitionhard
  3. 3.Lost update on a wallet balancehard
  4. 4.Cache stampede on a hot keyhard
  5. 5.Saving to DB and publishing an eventhard
  6. 6.One slow route freezes Node.jshard
  7. 7.Connection pools and autoscalinghard
  8. 8.Why a lock alone is not enoughhard
  9. 9.NOT IN with a NULL in the listhard
  10. 10.Workers block each other on a jobs tablehard
  11. 11.Deadlocks between two transfershard
  12. 12.Two doctors go off call at oncehard
  13. 13.Account events processed out of orderhard
  14. 14.JWT verified with an attacker-chosen algorithmhard
  15. 15.Comparing secrets with ===hard
  16. 16.Retries stacked at every layerhard
  17. 17.Profile shows old data after savinghard
  18. 18.Adding a fifth cache nodehard
  19. 19.Sharding orders by creation datehard
  20. 20.Table bloat that VACUUM will not fixhard
  21. 21.Stale value returns after cache deletehard
  22. 22.Work continues after the client gives uphard
  23. 23.Trusting a Bloom filter answerhard
  24. 24.Index for the few pending rowshard
  25. 25.Inserts slow down with UUID keyshard
  26. 26.Burst at a fixed window boundaryhard
  27. 27.return versus return await in tryhard
  28. 28.Sorting by a user-chosen columnhard
  29. 29.Pool exhausted during paymentshard
  30. 30.Deep merge of untrusted JSONhard
  31. 31.Concurrent requests from throughputhard
  32. 32.Adding an index to a live big tablehard
  33. 33.Retries at every layerhard
  34. 34.Why add a circuit breakerhard
  35. 35.Connection resets when pods stophard
  36. 36.A CSV export runs out of memoryhard
  37. 37.File descriptors leak during downloadshard
  38. 38.Users uploading 2 GB videoshard
  39. 39.One bad row in a bulk importhard
  40. 40.How to send money amounts in JSONhard
  41. 41.Caching GraphQL responses at a CDNhard
  42. 42.Retiring an old API versionhard
  43. 43.Rate limiter blocks everyone togetherhard
  44. 44.A forgotten await crashes the serverhard
  45. 45.Every page load counts 80 million rowshard
  46. 46.A database blip restarts every podhard
  47. 47.Search filters too long for a URLhard
  48. 48.A PUT wipes the phone numberhard
  49. 49.Why rain water two pointers move the lower sidehard
  50. 50.Kadane returns 0 for all negativeshard
  51. 51.Avoiding duplicate triplets in 3Sumhard
  52. 52.Next lexicographic permutationhard
  53. 53.Find the duplicate without extra spacehard
  54. 54.Product of array except selfhard
  55. 55.Smallest missing positive integerhard
  56. 56.Median of two sorted arrayshard
  57. 57.Quickselect for the k-th largesthard
  58. 58.Reversing a string that has emojihard
  59. 59.Boyer–Moore without a guaranteed majorityhard
  60. 60.Maximum product subarrayhard
  61. 61.Sorting a file larger than memoryhard
  62. 62.Removing items while looping forwardhard
  63. 63.Dutch flag: when mid must not advancehard
  64. 64.Shortest subarray with sum at least K, with negativeshard
  65. 65.Sliding window medianhard
  66. 66.Substrings containing a, b and chard
  67. 67.Maximum sum of a circular subarrayhard
  68. 68.Maximum sum rectangle in a matrixhard
  69. 69.Running time of minimum window substringhard
  70. 70.The non-shrinking window trickhard
  71. 71.Sum of all subarray sumshard
  72. 72.Running totals of rupee amountshard
  73. 73.Range updates mixed with range querieshard
  74. 74.Rate limiting with a time windowhard
  75. 75.Subarrays with exactly two distinct valueshard
  76. 76.Why the max deque stores indexeshard
  77. 77.Bug in a minimum length windowhard
  78. 78.Fewest swaps to group all oneshard
  79. 79.Minimum eating speed by binary searchhard
  80. 80.Least ship capacity for a deadlinehard
  81. 81.Binary search that never endshard
  82. 82.Common free time across many calendarshard
  83. 83.Most meetings in one roomhard
  84. 84.Search a matrix sorted by rows and columnshard
  85. 85.KMP failure tablehard
  86. 86.Rabin–Karp and hash collisionshard
  87. 87.Longest palindromic substringhard
  88. 88.Parsing a date-only stringhard
  89. 89.Two identical-looking names that differhard
  90. 90.Sorting file names with numbershard
  91. 91.Counting inversionshard
  92. 92.Largest number from concatenationhard
  93. 93.Fewest arrows for overlapping balloonshard
  94. 94.Largest rectangle in a histogramhard
  95. 95.Sum of all subarray minimumshard
  96. 96.Remove k digits for the smallest numberhard
  97. 97.Asteroid collisionhard
  98. 98.Sorting by two keys with a stable sorthard
  99. 99.Two long passwords both workhard
  100. 100.Upgrading old password hasheshard
  101. 101.Login timing reveals real accountshard
  102. 102.Locking accounts after 5 failureshard
  103. 103.Logins from leaked password listshard
  104. 104.Guessing an OTP with no attempt limithard
  105. 105.Magic login links already usedhard
  106. 106.Merging accounts by email from a login providerhard
  107. 107.One company sees another's invoiceshard
  108. 108.Removed admin can still delete usershard
  109. 109.Revoking a stolen JWT earlyhard
  110. 110.How PKCE's code challenge is madehard
  111. 111.Another app catches the OAuth redirecthard
  112. 112.Why passkeys stop phishinghard
  113. 113.A huge SMS bill from the OTP endpointhard
  114. 114.Two usernames that look identicalhard
  115. 115.A 1 MB password slows the serverhard
  116. 116.Making stolen access tokens uselesshard
  117. 117.Keeping OAuth tokens out of the browserhard
  118. 118.Permissions for shared documentshard
  119. 119.An authorization code used twicehard
  120. 120.Hundreds of roles that nobody understandshard
  121. 121.Slow guessing from thousands of IPshard
  122. 122.A user subdomain overrides your cookiehard
  123. 123.An approve button inside a hidden framehard
  124. 124.One token accepted by every servicehard
  125. 125.Reset tokens in a leaked databasehard
  126. 126.Logged in to the attacker's accounthard
  127. 127.A reset link used twice at oncehard
  128. 128.A transaction spread across connectionshard
  129. 129.Features that break behind PgBouncerhard
  130. 130.Errors under Serializable isolationhard
  131. 131.Deadlocks in money transfershard
  132. 132.Both doctors go off callhard
  133. 133.Tables grow though rows are deletedhard
  134. 134.Adding an index without blocking writeshard
  135. 135.Which new column rewrites the tablehard
  136. 136.Backfilling a new column on a big tablehard
  137. 137.Migrations run on every pod starthard
  138. 138.Order saved but event never senthard
  139. 139.A queue message applied twicehard
  140. 140.One counter row slows every salehard
  141. 141.Two admins edit the same producthard
  142. 142.A bad query takes the database downhard
  143. 143.Two workers both think they hold the lockhard
  144. 144.CROSSSLOT errors after moving to Clusterhard
  145. 145.Eviction policy set, but writes still failhard
  146. 146.Jobs lost when workers crashhard
  147. 147.Transactions fail on a local MongoDBhard
  148. 148.One write escapes a MongoDB transactionhard
  149. 149.Billions of tiny sensor documentshard
  150. 150.Some orders never match a queryhard
  151. 151.One Redis key gets half of all traffichard
  152. 152.How much data AOF everysec can losehard
  153. 153.Keeping wallet balances only in Redishard
  154. 154.Keeping only the last 50 notificationshard
  155. 155.All inserts land on one shardhard
  156. 156.Two payment retries run at oncehard
  157. 157.A Lua script stalls every clienthard
  158. 158.Sharding by tenant with one giant tenanthard
  159. 159.A report across all shardshard
  160. 160.Search shows deleted productshard
  161. 161.Deleting old log rows every nighthard
  162. 162.Two kinds of database timeouthard
  163. 163.The connection dropped during COMMIThard
  164. 164.New code crashes on old cache entrieshard
  165. 165.A join across two services' databaseshard
  166. 166.A query with 20,000 ids in IN (...)hard
  167. 167.Emoji in reviews fail to savehard
  168. 168.'José' blocked because 'Jose' existshard
  169. 169.Stock trading with a fee per tradehard
  170. 170.Stock DP with at most k tradeshard
  171. 171.Memo that never hits in JavaScripthard
  172. 172.A memo cache in a long-running serverhard
  173. 173.When top-down beats bottom-uphard
  174. 174.Splitting 10 for the largest producthard
  175. 175.Counting DP mod 1e9+7 in JavaScripthard
  176. 176.Fibonacci for a huge nhard
  177. 177.Tiling a 2 × 4 board with dominoeshard
  178. 178.Taking a value removes its neighbourshard
  179. 179.Nesting envelopes inside each otherhard
  180. 180.When adding a cache does not helphard
  181. 181.Is O(n × amount) polynomial?hard
  182. 182.How many longest increasing subsequenceshard
  183. 183.Painting houses with many colours fasthard
  184. 184.Bitmask DP for a 20-stop delivery routehard
  185. 185.The "tight" flag in digit DPhard
  186. 186.Two eggs and a 100-floor buildinghard
  187. 187.Knapsack with a capacity of a billionhard
  188. 188.Shortest string containing two stringshard
  189. 189.Fewest cuts into palindromeshard
  190. 190.Two players taking from either endhard
  191. 191.Why two greedy passes failhard
  192. 192.Ways two dice add up to 7hard
  193. 193.When a recurrence cannot be tabulatedhard
  194. 194.Matching customer names with typoshard
  195. 195.Breaking text into neat lineshard
  196. 196.Which items did the knapsack takehard
  197. 197.Longest increasing path in a matrixhard
  198. 198.Edit distance on two large fileshard
  199. 199.Speeding up a Sudoku solverhard
  200. 200.Balanced strings of three bracket pairshard
  201. 201.Bug in a grid word searchhard
  202. 202.Proving a greedy rule is optimalhard
  203. 203.CPU tasks with a cooldownhard
  204. 204.Fewest rooms for overlapping meetingshard
  205. 205.Recursive traversal crashes on big inputhard
  206. 206.Maximum path sum with negative valueshard
  207. 207.LCA in a tree without BST orderhard
  208. 208.Counting nodes of a complete tree quicklyhard
  209. 209.Storing duplicate keys in a BSThard
  210. 210.When preorder and postorder are not enoughhard
  211. 211.Worst-case height of an AVL treehard
  212. 212.Ties in vertical order traversalhard
  213. 213.Building a balanced BST from sorted datahard
  214. 214.Answering many LCA queries fasthard
  215. 215.Binary lifting memory and query costhard
  216. 216.Flattening a tree into a list in placehard
  217. 217.Cost of a BST iteratorhard
  218. 218.Fixing a BST with two swapped keyshard
  219. 219.Evaluating an expression treehard
  220. 220.Grid search where keys open doorshard
  221. 221.Shortest path with k walls you can breakhard
  222. 222.Edges to finished nodes in directed DFShard
  223. 223.False cycle alarm in a dependency graphhard
  224. 224.Adjacency matrix for 100,000 usershard
  225. 225.BFS over a graph stored in SQLhard
  226. 226.BFS for a web crawlerhard
  227. 227.Knight moves across a chessboardhard
  228. 228.Why use iterative deepeninghard
  229. 229.Walking every road exactly oncehard
  230. 230.Visiting every node versus every edgehard
  231. 231.Is every node reachable from every nodehard
  232. 232.Island count with diagonal neighbourshard
  233. 233.Cycle check with duplicate edgeshard
  234. 234.Visited set for a 5000 × 5000 gridhard
  235. 235.A graph where Dijkstra goes wronghard
  236. 236.Making all weights positive by adding a constanthard
  237. 237.Changing weights without changing the MSThard
  238. 238.Shortest paths in a DAG with negative edgeshard
  239. 239.When Dijkstra can stop earlyhard
  240. 240.Cheapest trip with one half-price couponhard
  241. 241.Union-find without either optimisationhard
  242. 242.Connectivity while links are removedhard
  243. 243.Routers slowly counting uphard
  244. 244.Fast routes on a country-sized maphard
  245. 245.All pairs on a sparse graph with negative edgeshard
  246. 246.Spotting a negative cycle in Floyd-Warshallhard
  247. 247.Answering division queries with union-findhard
  248. 248.Connecting 1,000 points by Manhattan distancehard
  249. 249.All-pairs table for a large cityhard
  250. 250.Maximum flow in a small networkhard
  251. 251.Why Edmonds-Karp uses BFShard
  252. 252.Assigning engineers to on-call shiftshard
  253. 253.Topological sort on a 200,000-step chainhard
  254. 254.Checking 2-SAT with strongly connected componentshard
  255. 255.Range updates on a segment treehard
  256. 256.Deleting a word from a triehard
  257. 257.Scanning text for thousands of keywordshard
  258. 258.Best root for the shortest treehard
  259. 259.Sum of distances from every nodehard
  260. 260.Diameter of a tree with two searcheshard
  261. 261.Kahn’s algorithm hangs on duplicate edgeshard
  262. 262.How a spreadsheet recalculates cellshard
  263. 263.Random surfer behind PageRankhard
  264. 264.Detecting a database deadlockhard
  265. 265.Hash flooding attackshard
  266. 266.Java HashMap worst case since Java 8hard
  267. 267.Deleting entries while loopinghard
  268. 268.Designing an O(1) LRU cachehard
  269. 269.Word counts that break on "constructor"hard
  270. 270.NaN and -0 as Map keyshard
  271. 271.Floating point numbers as keyshard
  272. 272.Is Python dict order guaranteedhard
  273. 273.Adding a cache server without reshufflinghard
  274. 274.What a Bloom filter can promisehard
  275. 275.Sharing a HashMap across threadshard
  276. 276.Unique pairs with a given differencehard
  277. 277.When a sorted array beats a hash maphard
  278. 278.Key order in a plain objecthard
  279. 279.When a Java HashMap resizeshard
  280. 280.Prefix count updated too earlyhard
  281. 281.First or last index of a prefix sumhard
  282. 282.How soon 32-bit hashes collidehard
  283. 283.Reducing rolling hash collisionshard
  284. 284.Deleting from an open-addressing tablehard
  285. 285.Clustering in linear probinghard
  286. 286.Counting unique visitors at huge scalehard
  287. 287.Set order changing between runshard
  288. 288.Same request, two cache entrieshard
  289. 289.Cuckoo hashing lookupshard
  290. 290.Two Java strings with the same hashCodehard
  291. 291.Bug in an at-most-two-distinct windowhard
  292. 292.Detecting a loop in a linked listhard
  293. 293.Distinct values in every windowhard
  294. 294.Stopping double charges on retrieshard
  295. 295.Python keys 1, 1.0 and Truehard
  296. 296.int[] as a HashMap keyhard
  297. 297.Adding to a Map during forEachhard
  298. 298.One key overloading a cache shardhard
  299. 299.Avoiding resize pauses in a HashMaphard
  300. 300.Dataclass objects in a Python sethard
  301. 301.Deduplicating more data than fits in memoryhard
  302. 302.Perfect hashing for a fixed key sethard
  303. 303.Why consistent hashing uses virtual nodeshard
  304. 304.Error direction of a Count-Min Sketchhard
  305. 305.NaN membership in a Python sethard
  306. 306.Counting all pairs that sum to a targethard
  307. 307.Array or map for sparse large IDshard
  308. 308.Making map output stable for testshard
  309. 309.Designing an O(1) LFU cachehard
  310. 310.What Object.groupBy returnshard
  311. 311.Deleting from a dict while loopinghard
  312. 312.Counting balanced 0 and 1 subarrayshard
  313. 313.A test that depends on HashMap orderhard
  314. 314.Race in check-then-puthard
  315. 315.Concurrent writes to a Go maphard
  316. 316.Memo cache misses for equal argumentshard
  317. 317.Hash index vs B-tree indexhard
  318. 318.Rows that match columns in a gridhard
  319. 319.Bias from random byte % 100hard
  320. 320.Shuffling with sort and Math.randomhard
  321. 321.Fisher-Yates with one wrong boundhard
  322. 322.Midpoint overflow in binary searchhard
  323. 323.Inverse of 3 modulo 7hard
  324. 324.Computing a large power mod mhard
  325. 325.Adding 1 to 2^53hard
  326. 326.What Kahan summation fixeshard
  327. 327.A fixed epsilon on large numbershard
  328. 328.Area of a five-point plothard
  329. 329.Left or right turn from a cross producthard
  330. 330.Do two booking slots overlaphard
  331. 331.Distance between two GPS pointshard
  332. 332.EMI on a one-year loanhard
  333. 333.Splitting ₹100 three wayshard
  334. 334.Picking one random log line from a streamhard
  335. 335.Weighted random server choicehard
  336. 336.Making a Monte Carlo result 10× more precisehard
  337. 337.A planet spirals away in a simulationhard
  338. 338.A physics loop that never catches uphard
  339. 339.Camera smoothing differs by frame ratehard
  340. 340.Rotate then translate a pointhard
  341. 341.Moving a model also moves its normalshard
  342. 342.Lighting breaks after squashing a modelhard
  343. 343.Upper bound of the fifth retry delayhard
  344. 344.Luhn check digithard
  345. 345.How an IBAN is checkedhard
  346. 346.Replacing % with a bit maskhard
  347. 347.Multiplayer games drifting aparthard
  348. 348.Tax on ₹9 lakh with slabshard
  349. 349.Multiplying two Q8.8 numbershard
  350. 350.Brightness 200 + 100 goes darkhard
  351. 351.Gray code of the number 6hard
  352. 352.The exactly-once claimhard
  353. 353.Rebalances during slow batcheshard
  354. 354.Retrying at the back of the queuehard
  355. 355.Undoing steps in a sagahard
  356. 356.Choreography or orchestrationhard
  357. 357.Calculating consumer laghard
  358. 358.Consumer offline past retentionhard
  359. 359.Duplicates from producer retrieshard
  360. 360.Adding partitions to a keyed topichard
  361. 361.Connection drops during long taskshard
  362. 362.Messages vanish from the DLQhard
  363. 363.Cost of unbatched SQS callshard
  364. 364.One tenant floods the queuehard
  365. 365.Publishers suddenly hanghard
  366. 366.How much data to put in an eventhard
  367. 367.Channel closed after 30 minuteshard
  368. 368.acks=all with min.insync.replicashard
  369. 369.Seeing aborted transactional writeshard
  370. 370.Retries reorder a partitionhard
  371. 371.One hot RabbitMQ queuehard
  372. 372.Rolling out a breaking event changehard
  373. 373.Low-priority jobs never runhard
  374. 374.Replaying events resends emailshard
  375. 375.Kafka offsets and database writeshard
  376. 376.Consumer cannot find new datahard
  377. 377.Consumer runs out of memoryhard
  378. 378.Non-deterministic workflow codehard
  379. 379.One big customer on one partitionhard
  380. 380.Backoff without a delay queuehard
  381. 381.Calculating an error budget burn ratehard
  382. 382.Surviving the loss of one zonehard
  383. 383.Hedging slow requestshard
  384. 384.A fixed concurrency limithard
  385. 385.The cache becomes criticalhard
  386. 386.When the control plane is downhard
  387. 387.A config change takes down every regionhard
  388. 388.Idempotency keys that expire too soonhard
  389. 389.A timeout set at the medianhard
  390. 390.One bad instance trips the breakerhard
  391. 391.Serving requests newest firsthard
  392. 392.A payment call timed outhard
  393. 393.A fallback that makes things worsehard
  394. 394.Accepting orders while the DB is downhard
  395. 395.Health check green during an outagehard
  396. 396.Autoscaling during a dependency outagehard
  397. 397.Queries keep running after the client quitshard
  398. 398.Errors cached at the edgehard
  399. 399.Telemetry backlog on a slow linkhard
  400. 400.Automatic failover keeps flippinghard
  401. 401.How introsort avoids quick sort's worst casehard
  402. 402.C++ sort versus stable_sorthard
  403. 403.Lomuto quick sort on all-equal keyshard
  404. 404.Best algorithm to sort a linked listhard
  405. 405.Insertion sort comparisons on reversed inputhard
  406. 406.Minimum swaps to sort a permutationhard
  407. 407.Radix sort versus a comparison sorthard
  408. 408.Sorting software version numbershard
  409. 409.Timsort on already sorted datahard
  410. 410.Bug from sorting with an unstable sorthard
  411. 411.Rows missing across paginated pageshard
  412. 412.Default sort of a Float64Arrayhard
  413. 413.Largest number formed from an arrayhard
  414. 414.Why selection sort is not stablehard
  415. 415.Binary search loop that never endshard
  416. 416.Bit-shift midpoint in JavaScripthard
  417. 417.Binary search over real numbershard
  418. 418.k-th smallest pair distancehard
  419. 419.k-th smallest in a sorted matrixhard
  420. 420.Split an array to minimise the largest sumhard
  421. 421.Rotated array search with duplicateshard
  422. 422.Duplicate number by counting valueshard
  423. 423.Half-open binary search boundshard
  424. 424.Sorted array or hash map for lookupshard
  425. 425.Place items to maximise the minimum gaphard
  426. 426.Search in a bitonic arrayhard
  427. 427.How many times a sorted array was rotatedhard
  428. 428.Why Karatsuba beats school multiplicationhard
  429. 429.Median of medians pivot selectionhard
  430. 430.Closest pair of points in O(n log n)hard
  431. 431.Strassen matrix multiplicationhard
  432. 432.Insertion sort cutoff in fast sortshard
  433. 433.Sorting data across many machineshard
  434. 434.Counting car fleets to a targethard
  435. 435.Sliding window maximumhard
  436. 436.Decoding a nested repeat stringhard
  437. 437.Deep recursion on a skewed treehard
  438. 438.Trapping rain waterhard
  439. 439.Why doubling keeps push at O(1)hard
  440. 440.Worst single dequeue in a two-stack queuehard
  441. 441.Calculator with brackets and minushard
  442. 442.Sum of subarray minimumshard
  443. 443.Shortest subarray with sum at least Khard
  444. 444.Iterative DFS visits in a different orderhard
  445. 445.Longest valid parentheses substringhard
  446. 446.Detecting a 132 pattern in O(n)hard
  447. 447.Java Stack class or ArrayDequehard
  448. 448.Palindrome check on a linked listhard
  449. 449.Finding where two lists intersecthard
  450. 450.Reordering a list from both endshard
  451. 451.Reversing a linked list in groups of khard
  452. 452.How a skip list gets fast searchhard
  453. 453.Do circular links leak memory in JavaScript?hard
  454. 454.Java LinkedList versus ArrayListhard
  455. 455.Stale entries in Dijkstra's heaphard
  456. 456.Supporting decrease-key in a binary heaphard
  457. 457.Fibonacci heaps in real systemshard
  458. 458.When a 4-ary heap beats a binary heaphard
  459. 459.Equal priorities in Python heapqhard
  460. 460.Cheapest way to join ropeshard
  461. 461.Median of a sliding windowhard
  462. 462.Reliable job queue on Redis listshard
  463. 463.Backpressure in Node.js streamshard
  464. 464.Managing millions of timershard
  465. 465.Work-stealing deques in thread poolshard
  466. 466.Promise loop that freezes timershard
  467. 467.Fan-out for a celebrity accounthard
  468. 468.The weakness of two-phase commithard
  469. 469.Last-write-wins loses an updatehard
  470. 470.Offline edits that must mergehard
  471. 471.How many nodes can failhard
  472. 472.Trade-offs without a partitionhard
  473. 473.Linearizable is not serializablehard
  474. 474.Requests for keys that do not existhard
  475. 475.Risk of a write-back cachehard
  476. 476.Random UUIDs as primary keyshard
  477. 477.Memory for a million socketshard
  478. 478.Holding seats during checkouthard
  479. 479.Designing a wallet ledgerhard
  480. 480.Limiting the blast radiushard
  481. 481.Writes in two regions at oncehard
  482. 482.Throttling on one partition keyhard
  483. 483.Rebuilding state from many eventshard