<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Nitin Malviya</title>
    <description>The latest articles on DEV Community by Nitin Malviya (@nitinmalviy).</description>
    <link>https://dev.to/nitinmalviy</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3584160%2F4548cc02-041a-4c6b-92bd-fe73a42db50e.png</url>
      <title>DEV Community: Nitin Malviya</title>
      <link>https://dev.to/nitinmalviy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nitinmalviy"/>
    <language>en</language>
    <item>
      <title>JS + DSA Roadmap (3–4 Months)</title>
      <dc:creator>Nitin Malviya</dc:creator>
      <pubDate>Mon, 27 Oct 2025 06:50:58 +0000</pubDate>
      <link>https://dev.to/nitinmalviy/js-dsa-roadmap-3-4-months-4c1</link>
      <guid>https://dev.to/nitinmalviy/js-dsa-roadmap-3-4-months-4c1</guid>
      <description>&lt;h3&gt;
  
  
  &lt;strong&gt;Month 1: Foundation &amp;amp; Recursion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Topics:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Recursion basics (factorial, Fibonacci, sum of array, reverse string, power of number)&lt;/li&gt;
&lt;li&gt;Time &amp;amp; Space Complexity basics (O(1), O(n), O(n²), O(log n))&lt;/li&gt;
&lt;li&gt;Iterative vs Recursive solutions comparison&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Practice:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Solve &lt;strong&gt;10–12 recursion problems&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Analyze &lt;strong&gt;TC &amp;amp; SC&lt;/strong&gt; for each&lt;/li&gt;
&lt;li&gt;Dry run + recursion stack understanding&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Month 2: Arrays &amp;amp; Linked Lists&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Topics:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Arrays (search, sort, sliding window, two pointers)&lt;/li&gt;
&lt;li&gt;Linked List: Single, Doubly, Circular&lt;/li&gt;
&lt;li&gt;Operations: Insert, Delete, Reverse, Merge, Detect Loop&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Practice:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;5 problems per topic (Array + Linked List)&lt;/li&gt;
&lt;li&gt;TC/SC analysis for each solution&lt;/li&gt;
&lt;li&gt;Pattern recognition (sliding window, fast/slow pointers)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Month 3: Stack, Queue, Hash Table, Trees&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Topics:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stack (LIFO, parenthesis check, min stack)&lt;/li&gt;
&lt;li&gt;Queue (FIFO, circular queue, deque)&lt;/li&gt;
&lt;li&gt;Hash Table (frequency map, two sum)&lt;/li&gt;
&lt;li&gt;Trees: Binary Tree, Binary Search Tree&lt;/li&gt;
&lt;li&gt;Tree traversal: Inorder, Preorder, Postorder, Level Order&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Practice:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;5 problems per topic&lt;/li&gt;
&lt;li&gt;TC/SC analysis + recursion where applicable&lt;/li&gt;
&lt;li&gt;Patterns: recursion in trees, hash map tricks&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Month 4: Advanced DS &amp;amp; Algorithms&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Topics:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Heap (min/max heap, priority queue)&lt;/li&gt;
&lt;li&gt;Suffix Tree, Trie, Disjoint Set&lt;/li&gt;
&lt;li&gt;Graphs: BFS, DFS, shortest path&lt;/li&gt;
&lt;li&gt;Sorting: Merge, Quick, Heap&lt;/li&gt;
&lt;li&gt;Greedy, Backtracking, Dynamic Programming basics&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Practice:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;5 problems per topic&lt;/li&gt;
&lt;li&gt;Analyze TC/SC + identify patterns (divide &amp;amp; conquer, memoization, greedy choice)&lt;/li&gt;
&lt;li&gt;Start with easy → medium → hard problems&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Daily/Weekly Practice Suggestion&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Daily:&lt;/strong&gt; 1–2 problems + TC/SC analysis&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Weekly:&lt;/strong&gt; 1 topic summary + patterns + mini project if possible&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monthly:&lt;/strong&gt; 2–3 mock problem sets (Leetcode/Hackerrank)&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Extra Tips&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;strong&gt;JS&lt;/strong&gt; throughout (Node.js environment)&lt;/li&gt;
&lt;li&gt;Dry run solutions on paper before coding&lt;/li&gt;
&lt;li&gt;Note patterns + tricks in Notion for future reference&lt;/li&gt;
&lt;li&gt;Start integrating DSA in small projects (e.g., book management features)&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>datastructures</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>interview</category>
    </item>
    <item>
      <title>Frontend &amp; Java script Interview Questions</title>
      <dc:creator>Nitin Malviya</dc:creator>
      <pubDate>Mon, 27 Oct 2025 06:47:16 +0000</pubDate>
      <link>https://dev.to/nitinmalviy/frontend-java-script-interview-questions-1f9l</link>
      <guid>https://dev.to/nitinmalviy/frontend-java-script-interview-questions-1f9l</guid>
      <description>&lt;h3&gt;
  
  
  &lt;strong&gt;Core JavaScript&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Difference between &lt;code&gt;var&lt;/code&gt;, &lt;code&gt;let&lt;/code&gt;, and &lt;code&gt;const&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Explain &lt;code&gt;hoisting&lt;/code&gt; in JavaScript.&lt;/li&gt;
&lt;li&gt;Difference between &lt;code&gt;==&lt;/code&gt; and &lt;code&gt;===&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Explain &lt;code&gt;this&lt;/code&gt; keyword in different contexts (global, function, class, arrow function).&lt;/li&gt;
&lt;li&gt;Difference between &lt;code&gt;call&lt;/code&gt;, &lt;code&gt;apply&lt;/code&gt;, and &lt;code&gt;bind&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Event bubbling vs event capturing.&lt;/li&gt;
&lt;li&gt;What is closure? Give example.&lt;/li&gt;
&lt;li&gt;Difference between &lt;code&gt;null&lt;/code&gt; and &lt;code&gt;undefined&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Difference between &lt;code&gt;map&lt;/code&gt;, &lt;code&gt;forEach&lt;/code&gt;, &lt;code&gt;filter&lt;/code&gt;, &lt;code&gt;reduce&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;What is IIFE (Immediately Invoked Function Expression)?&lt;/li&gt;
&lt;li&gt;Difference between synchronous and asynchronous JavaScript.&lt;/li&gt;
&lt;li&gt;What is the event loop? Explain microtasks and macrotasks.&lt;/li&gt;
&lt;li&gt;Difference between shallow copy and deep copy — how to implement.&lt;/li&gt;
&lt;li&gt;Difference between &lt;code&gt;Object.assign()&lt;/code&gt; and spread operator.&lt;/li&gt;
&lt;li&gt;Explain prototype and prototype chain.&lt;/li&gt;
&lt;li&gt;Explain ES6 modules and CommonJS modules difference.&lt;/li&gt;
&lt;li&gt;What are Promises and how do they work?&lt;/li&gt;
&lt;li&gt;Difference between &lt;code&gt;async/await&lt;/code&gt; and &lt;code&gt;.then/.catch()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;How does garbage collection work in JS?&lt;/li&gt;
&lt;li&gt;Difference between &lt;code&gt;for…in&lt;/code&gt; and &lt;code&gt;for…of&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Advanced / Scenario-Based JS&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Implement debounce and throttle functions — explain use case.&lt;/li&gt;
&lt;li&gt;Difference between &lt;code&gt;mutable&lt;/code&gt; and &lt;code&gt;immutable&lt;/code&gt; objects in JS.&lt;/li&gt;
&lt;li&gt;Explain memory leak scenarios in JS and how to prevent.&lt;/li&gt;
&lt;li&gt;Implement a function to deep clone nested objects.&lt;/li&gt;
&lt;li&gt;Difference between &lt;code&gt;setTimeout(fn, 0)&lt;/code&gt; and &lt;code&gt;Promise.resolve().then(fn)&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Explain Symbol and its usage.&lt;/li&gt;
&lt;li&gt;Difference between generator function and async generator.&lt;/li&gt;
&lt;li&gt;How to handle large array processing without blocking UI (chunking).&lt;/li&gt;
&lt;li&gt;Explain &lt;code&gt;WeakMap&lt;/code&gt; and &lt;code&gt;WeakSet&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Difference between &lt;code&gt;Object.freeze()&lt;/code&gt; and &lt;code&gt;const&lt;/code&gt; in objects.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Tricky JavaScript Questions (Advanced)&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;What's the output?&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;javascript&lt;/p&gt;

&lt;p&gt;&lt;code&gt;console.log(typeof typeof 1);&lt;br&gt;
   console.log(0.1 + 0.2 === 0.3);&lt;br&gt;
   console.log([] == ![]);&lt;br&gt;
   console.log(+'10' + 5);&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Explain the execution order:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;javascript&lt;/p&gt;

&lt;p&gt;&lt;code&gt;console.log('1');&lt;br&gt;
   setTimeout(() =&amp;gt; console.log('2'), 0);&lt;br&gt;
   Promise.resolve().then(() =&amp;gt; console.log('3'));&lt;br&gt;
   console.log('4');&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Temporal Dead Zone (TDZ)&lt;/strong&gt; — explain with example and why it exists.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What happens when you do this?&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;javascript&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const obj = { a: 1 };&lt;br&gt;
   const arr = [obj, obj];&lt;br&gt;
   arr[0].a = 2;&lt;br&gt;
   console.log(arr[1].a); *// ?*&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Explain currying&lt;/strong&gt; — implement a curry function that works for any function.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What's wrong with this code?&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;javascript&lt;/p&gt;

&lt;p&gt;&lt;code&gt;for (var i = 0; i &amp;lt; 3; i++) {&lt;br&gt;
     setTimeout(() =&amp;gt; console.log(i), 100);&lt;br&gt;
   }&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;How to fix it? (Multiple solutions)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Implement a pipe/compose function&lt;/strong&gt; — explain the difference.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explain Proxy and Reflect API&lt;/strong&gt; — practical use case (e.g., validation).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What is the difference between &lt;code&gt;Object.create(null)&lt;/code&gt; and &lt;code&gt;{}&lt;/code&gt;?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement a function that executes promises in sequence&lt;/strong&gt; (not parallel).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Explain the difference between:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;javascript&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`function foo() { return { bar: "hello" }; }
function foo() { 
  return 
  { bar: "hello" }; 
}`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;What is the &lt;code&gt;new&lt;/code&gt; keyword doing internally?&lt;/strong&gt; Implement your own &lt;code&gt;new&lt;/code&gt; operator.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explain tail call optimization&lt;/strong&gt; — does JS support it?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement a memoization function&lt;/strong&gt; that works for any function with any number of arguments.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What's the output and why?&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;javascript&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`const promise = new Promise((resolve) =&amp;gt; {
  console.log(1);
  resolve();
  console.log(2);
});
promise.then(() =&amp;gt; console.log(3));
console.log(4);`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;How do you detect if a function is called with &lt;code&gt;new&lt;/code&gt;?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Implement &lt;code&gt;Promise.all&lt;/code&gt;, &lt;code&gt;Promise.race&lt;/code&gt;, and &lt;code&gt;Promise.allSettled&lt;/code&gt; from scratch.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What is the difference between &lt;code&gt;Promise.then()&lt;/code&gt; chaining and &lt;code&gt;async/await&lt;/code&gt; error propagation?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Explain the "double equals quirks":&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;javascript&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`[] == ![] *// true*
{} == !{} *// false*
[] == [] *// false*`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;What's the difference between &lt;code&gt;arguments&lt;/code&gt; and rest parameters?&lt;/strong&gt; Why avoid &lt;code&gt;arguments&lt;/code&gt;?&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Advanced Memory &amp;amp; Performance Questions&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Memory leak scenario:&lt;/strong&gt; Event listeners not removed — how to detect and fix?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explain V8's garbage collection algorithms:&lt;/strong&gt; Mark-and-sweep, Scavenge, Major GC.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to profile memory usage in Node.js?&lt;/strong&gt; Tools and approaches.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What causes memory leaks in closures?&lt;/strong&gt; Give specific example.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explain hidden classes and inline caching in V8&lt;/strong&gt; — how to write optimized code?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What is the &lt;code&gt;-max-old-space-size&lt;/code&gt; flag?&lt;/strong&gt; When to use it?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How do you handle 10GB file processing in Node.js without loading it all into memory?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement a LRU (Least Recently Used) cache&lt;/strong&gt; with O(1) get and put operations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explain memory fragmentation&lt;/strong&gt; — how does it affect Node.js applications?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How to detect and fix event loop blocking in production?&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h1&gt;
  
  
  React / Next.js / State Management Questions
&lt;/h1&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;React Core&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Difference between class components and functional components.&lt;/li&gt;
&lt;li&gt;What is virtual DOM and how React uses it?&lt;/li&gt;
&lt;li&gt;Explain React lifecycle methods (class) and hooks equivalents.&lt;/li&gt;
&lt;li&gt;Explain useState and useEffect — common pitfalls.&lt;/li&gt;
&lt;li&gt;Explain useMemo and useCallback — when and why to use.&lt;/li&gt;
&lt;li&gt;Difference between controlled and uncontrolled components.&lt;/li&gt;
&lt;li&gt;Explain React context API and its use case.&lt;/li&gt;
&lt;li&gt;How to prevent unnecessary re-renders in React.&lt;/li&gt;
&lt;li&gt;Difference between key props in lists — why important.&lt;/li&gt;
&lt;li&gt;Explain reconciliation in React.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;React Advanced / Optimization&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Explain code splitting and lazy loading in React.&lt;/li&gt;
&lt;li&gt;Difference between React.memo, PureComponent, and useMemo.&lt;/li&gt;
&lt;li&gt;How to optimize React app performance — list techniques.&lt;/li&gt;
&lt;li&gt;Explain event delegation in React.&lt;/li&gt;
&lt;li&gt;How to handle large forms efficiently.&lt;/li&gt;
&lt;li&gt;How to handle error boundaries in React.&lt;/li&gt;
&lt;li&gt;What is Suspense and Concurrent Mode in React.&lt;/li&gt;
&lt;li&gt;Difference between client-side rendering and server-side rendering.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;React Advanced &amp;amp; Tricky Questions&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;What's wrong with this code?&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;javascript&lt;/p&gt;

&lt;p&gt;&lt;code&gt;function Component() {&lt;br&gt;
     const [count, setCount] = useState(0);&lt;br&gt;
     const handleClick = () =&amp;gt; {&lt;br&gt;
       setCount(count + 1);&lt;br&gt;
       setCount(count + 1);&lt;br&gt;
       setCount(count + 1);&lt;br&gt;
     };&lt;br&gt;
     return &amp;lt;button onClick={handleClick}&amp;gt;{count}&amp;lt;/button&amp;gt;;&lt;br&gt;
   }&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;How to fix it? Explain batching.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Explain the difference between:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;javascript&lt;/p&gt;

&lt;p&gt;&lt;code&gt;useEffect(() =&amp;gt; { */* ... */* }, []);&lt;br&gt;
   useEffect(() =&amp;gt; { */* ... */* });&lt;br&gt;
   useLayoutEffect(() =&amp;gt; { */* ... */* }, []);&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Why is this an infinite loop?&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;javascript&lt;/p&gt;

&lt;p&gt;&lt;code&gt;useEffect(() =&amp;gt; {&lt;br&gt;
     setData(fetchData());&lt;br&gt;
   }, [data]);&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Implement a custom hook for debounced value.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What's the difference between:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;javascript&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;Component data={data} /&amp;gt;&lt;br&gt;
   &amp;lt;Component data={[...data]} /&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Explain stale closures in React hooks&lt;/strong&gt; — give example and solution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to share stateful logic between components without Context or Redux?&lt;/strong&gt; (Custom hooks)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What's the purpose of the &lt;code&gt;key&lt;/code&gt; prop in React?&lt;/strong&gt; Why not use index as key?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement useReducer from scratch&lt;/strong&gt; — explain when to use it over useState.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explain React Fiber architecture&lt;/strong&gt; — how it enables concurrent rendering.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How does React decide when to batch state updates?&lt;/strong&gt; Automatic batching in React 18.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What's the difference between &lt;code&gt;flushSync&lt;/code&gt; and normal state updates?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to prevent child component re-render when parent re-renders?&lt;/strong&gt; (Multiple techniques)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explain React's reconciliation algorithm&lt;/strong&gt; — Diff algorithm in detail.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What happens when you call setState in render method?&lt;/strong&gt; Why is it dangerous?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement a custom &lt;code&gt;usePrevious&lt;/code&gt; hook&lt;/strong&gt; that returns previous value of a state.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How to handle race conditions in useEffect with API calls?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explain ref forwarding and useImperativeHandle&lt;/strong&gt; — when to use?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What's the difference between synthetic events and native events in React?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to optimize context to prevent unnecessary re-renders?&lt;/strong&gt; Split context technique.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Next.js Advanced Questions&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Difference between SSR, SSG, ISR, and CSR in Next.js.&lt;/li&gt;
&lt;li&gt;Explain getServerSideProps vs getStaticProps.&lt;/li&gt;
&lt;li&gt;Explain API routes in Next.js.&lt;/li&gt;
&lt;li&gt;How to implement dynamic routing in Next.js.&lt;/li&gt;
&lt;li&gt;Explain Next.js image optimization.&lt;/li&gt;
&lt;li&gt;How to handle authentication in Next.js (JWT, cookies).&lt;/li&gt;
&lt;li&gt;Explain incremental static regeneration (ISR).&lt;/li&gt;
&lt;li&gt;How to optimize Next.js app performance (bundle splitting, caching).&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Next.js Advanced &amp;amp; Tricky&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;How does Next.js handle automatic code splitting?&lt;/strong&gt; Can you control it?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explain the difference between &lt;code&gt;next/link&lt;/code&gt; and regular anchor tags&lt;/strong&gt; — prefetching behavior.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to implement middleware in Next.js 13+?&lt;/strong&gt; Use cases and limitations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explain App Router vs Pages Router&lt;/strong&gt; — migration strategy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to handle environment variables securely in Next.js?&lt;/strong&gt; NEXT_PUBLIC_ prefix.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What's the difference between:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;javascript&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`export const revalidate = 60; *// ISR*
export const dynamic = 'force-dynamic'; *// SSR*
export const dynamic = 'force-static'; *// SSG*`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;How to implement edge functions in Next.js?&lt;/strong&gt; Difference from serverless.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explain streaming SSR in Next.js 13+&lt;/strong&gt; — Suspense boundaries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to optimize fonts in Next.js?&lt;/strong&gt; next/font system.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What happens when you use &lt;code&gt;use client&lt;/code&gt; directive?&lt;/strong&gt; Bundle implications.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to handle SEO for dynamic routes?&lt;/strong&gt; generateMetadata function.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Explain parallel and intercepting routes in App Router.&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Redux / State Management&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Difference between Redux and React context.&lt;/li&gt;
&lt;li&gt;Explain Redux flow — actions, reducers, store.&lt;/li&gt;
&lt;li&gt;How to avoid unnecessary re-renders with Redux.&lt;/li&gt;
&lt;li&gt;Difference between middleware in Redux — thunk, saga.&lt;/li&gt;
&lt;li&gt;How to structure Redux state for large apps.&lt;/li&gt;
&lt;li&gt;Explain Redux Toolkit and why it's preferred.&lt;/li&gt;
&lt;li&gt;How to handle async API calls in Redux.&lt;/li&gt;
&lt;li&gt;How to persist Redux state in localStorage/sessionStorage.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Redux Advanced &amp;amp; Tricky&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Why is Redux state immutable?&lt;/strong&gt; What happens if you mutate?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explain Redux middleware&lt;/strong&gt; — implement a custom logger middleware.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What's the difference between:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;javascript&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`useSelector(state =&amp;gt; state.user)
useSelector(state =&amp;gt; ({ user: state.user }))`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;code&gt;Re-render implications.&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;How does Redux Toolkit's &lt;code&gt;createSlice&lt;/code&gt; work under the hood?&lt;/strong&gt; Immer integration.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Explain Redux Saga effects:&lt;/strong&gt; &lt;code&gt;call&lt;/code&gt;, &lt;code&gt;put&lt;/code&gt;, &lt;code&gt;take&lt;/code&gt;, &lt;code&gt;fork&lt;/code&gt;, &lt;code&gt;spawn&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;How to handle optimistic updates in Redux?&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;What's the difference between &lt;code&gt;combineReducers&lt;/code&gt; and a single reducer?&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;How to implement time-travel debugging?&lt;/strong&gt; Redux DevTools internals.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Explain selectors and reselect library&lt;/strong&gt; — memoization benefits.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;How to handle authentication state in Redux?&lt;/strong&gt; Token refresh flow.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;What's the difference between Redux Thunk and Redux Saga?&lt;/strong&gt; When to use each?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;How to test Redux reducers and actions?&lt;/strong&gt; Best practices.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>frontend</category>
      <category>webdev</category>
      <category>programming</category>
      <category>interview</category>
    </item>
    <item>
      <title>Backend Interview Questions</title>
      <dc:creator>Nitin Malviya</dc:creator>
      <pubDate>Mon, 27 Oct 2025 06:45:32 +0000</pubDate>
      <link>https://dev.to/nitinmalviy/backend-interview-questions-2oo7</link>
      <guid>https://dev.to/nitinmalviy/backend-interview-questions-2oo7</guid>
      <description>&lt;h3&gt;
  
  
  &lt;strong&gt;Core Node.js Questions&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Node.js single-threaded hai — phir bhi multiple requests efficiently kaise handle karta hai? Explain event loop and non-blocking I/O.&lt;/li&gt;
&lt;li&gt;Difference between &lt;code&gt;process.nextTick()&lt;/code&gt; and &lt;code&gt;setImmediate()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;How does Node.js handle 1000 concurrent requests? Explain async nature and event loop.&lt;/li&gt;
&lt;li&gt;Explain Event Loop phases.&lt;/li&gt;
&lt;li&gt;What are microtasks and macrotasks in Node.js? Give examples.&lt;/li&gt;
&lt;li&gt;How does Node.js handle CPU-intensive tasks?&lt;/li&gt;
&lt;li&gt;How do you debug performance issues (CPU/memory) in Node.js?&lt;/li&gt;
&lt;li&gt;Difference between &lt;code&gt;require&lt;/code&gt; and &lt;code&gt;import&lt;/code&gt; in Node.js.&lt;/li&gt;
&lt;li&gt;Explain Streams in Node.js and give a scenario where they are useful.&lt;/li&gt;
&lt;li&gt;Difference between &lt;code&gt;fs.readFile&lt;/code&gt; and &lt;code&gt;fs.createReadStream&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Node.js Advanced &amp;amp; Tricky Questions&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Explain the 6 phases of Node.js event loop in detail:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Timers&lt;/li&gt;
&lt;li&gt;Pending callbacks&lt;/li&gt;
&lt;li&gt;Idle, prepare&lt;/li&gt;
&lt;li&gt;Poll&lt;/li&gt;
&lt;li&gt;Check&lt;/li&gt;
&lt;li&gt;Close callbacks&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What's the order of execution?&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;javascript&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`setImmediate(() =&amp;gt; console.log('immediate'));
process.nextTick(() =&amp;gt; console.log('nextTick'));
setTimeout(() =&amp;gt; console.log('timeout'), 0);
Promise.resolve().then(() =&amp;gt; console.log('promise'));
console.log('sync');`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;How do you handle CPU-intensive tasks without blocking the event loop?&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Worker threads&lt;/li&gt;
&lt;li&gt;Child processes&lt;/li&gt;
&lt;li&gt;Clustering&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explain the difference between &lt;code&gt;fork()&lt;/code&gt;, &lt;code&gt;spawn()&lt;/code&gt;, &lt;code&gt;exec()&lt;/code&gt;, &lt;code&gt;execFile()&lt;/code&gt;&lt;/strong&gt; in child_process.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What is &lt;code&gt;libuv&lt;/code&gt;?&lt;/strong&gt; Role in Node.js architecture.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How does Node.js utilize multiple CPU cores?&lt;/strong&gt; Cluster module.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explain backpressure in streams&lt;/strong&gt; — how to handle it?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What's the difference between readable, writable, duplex, and transform streams?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement a custom transform stream&lt;/strong&gt; that converts input to uppercase.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How do you prevent thread starvation in Node.js?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explain Node.js module resolution algorithm&lt;/strong&gt; — node_modules lookup.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What's the purpose of &lt;code&gt;package-lock.json&lt;/code&gt;?&lt;/strong&gt; Difference from &lt;code&gt;package.json&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to implement graceful shutdown in Node.js?&lt;/strong&gt; Handle ongoing requests.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explain the &lt;code&gt;uncaughtException&lt;/code&gt; and &lt;code&gt;unhandledRejection&lt;/code&gt; events&lt;/strong&gt; — best practices.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What's the difference between &lt;code&gt;Buffer&lt;/code&gt; and &lt;code&gt;Uint8Array&lt;/code&gt;?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to detect memory leaks in production Node.js apps?&lt;/strong&gt; Tools: heapdump, clinic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explain Node.js security best practices:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Helmet&lt;/li&gt;
&lt;li&gt;Rate limiting&lt;/li&gt;
&lt;li&gt;Input validation&lt;/li&gt;
&lt;li&gt;HTTPS&lt;/li&gt;
&lt;li&gt;Dependency scanning&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What is N-API?&lt;/strong&gt; Native addons in Node.js.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How do you monitor Node.js application performance?&lt;/strong&gt; Metrics to track.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explain the &lt;code&gt;-inspect&lt;/code&gt; flag&lt;/strong&gt; — debugging production apps.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Express.js Questions&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;What is middleware in Express? Types and examples.&lt;/li&gt;
&lt;li&gt;Explain error-handling middleware in Express.&lt;/li&gt;
&lt;li&gt;How to handle async errors in Express routes?&lt;/li&gt;
&lt;li&gt;How does Express handle routing internally?&lt;/li&gt;
&lt;li&gt;Difference between &lt;code&gt;app.use()&lt;/code&gt; and &lt;code&gt;router.use()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;How do you handle file uploads in Express?&lt;/li&gt;
&lt;li&gt;Explain rate limiting in Express — scenario where multiple requests come simultaneously.&lt;/li&gt;
&lt;li&gt;How to implement CORS in Express?&lt;/li&gt;
&lt;li&gt;How to secure Express app against common vulnerabilities (XSS, CSRF, SQL injection)?&lt;/li&gt;
&lt;li&gt;How do you implement logging in Express applications?&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Express.js Advanced &amp;amp; Tricky&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;What's the order of middleware execution?&lt;/strong&gt; How to control it?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How do you handle async errors without try-catch in every route?&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;javascript&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`const asyncHandler = (fn) =&amp;gt; (req, res, next) =&amp;gt; {
  Promise.resolve(fn(req, res, next)).catch(next);
};`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Explain the request-response cycle in Express&lt;/strong&gt; — detailed flow.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to implement custom middleware for authentication?&lt;/strong&gt; JWT verification.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What's the difference between &lt;code&gt;app.route()&lt;/code&gt; and &lt;code&gt;router.route()&lt;/code&gt;?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to handle multipart/form-data?&lt;/strong&gt; Multer internals.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement a middleware that logs request time&lt;/strong&gt; for every route.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to implement CSRF protection?&lt;/strong&gt; Token-based approach.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Explain the difference between:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;javascript&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`app.use('/api', router);
app.use(router);`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;How to implement request validation?&lt;/strong&gt; Joi, express-validator.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What happens if you call &lt;code&gt;next()&lt;/code&gt; multiple times?&lt;/strong&gt; Common mistakes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to implement compression in Express?&lt;/strong&gt; gzip, brotli.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explain the &lt;code&gt;res.locals&lt;/code&gt; object&lt;/strong&gt; — use cases.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to implement API versioning?&lt;/strong&gt; Multiple approaches.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What's the difference between &lt;code&gt;res.send()&lt;/code&gt;, &lt;code&gt;res.json()&lt;/code&gt;, &lt;code&gt;res.end()&lt;/code&gt;?&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;MongoDB / Mongoose Questions&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Difference between &lt;code&gt;find()&lt;/code&gt;, &lt;code&gt;findOne()&lt;/code&gt;, and &lt;code&gt;findById()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Explain aggregation pipeline with an example.&lt;/li&gt;
&lt;li&gt;What is indexing? How does it improve query performance?&lt;/li&gt;
&lt;li&gt;What is &lt;code&gt;populate()&lt;/code&gt; in Mongoose? Give example.&lt;/li&gt;
&lt;li&gt;Difference between embedded documents and references.&lt;/li&gt;
&lt;li&gt;How to design schema for a blog or e-commerce app?&lt;/li&gt;
&lt;li&gt;How to handle large collections efficiently?&lt;/li&gt;
&lt;li&gt;Explain transactions in MongoDB and when to use them.&lt;/li&gt;
&lt;li&gt;How to implement pagination in MongoDB?&lt;/li&gt;
&lt;li&gt;How to handle schema validation in Mongoose?&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;MongoDB Advanced &amp;amp; Tricky Questions&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Explain MongoDB ACID properties&lt;/strong&gt; — transaction support.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What's the difference between:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;javascript&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`Model.find({})
Model.find({}).lean()
Model.find({}).cursor()`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;How does MongoDB indexing work internally?&lt;/strong&gt; B-tree structure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explain compound indexes&lt;/strong&gt; — order matters?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What's the difference between covered query and indexed query?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement text search in MongoDB&lt;/strong&gt; — full-text search indexes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to handle schema versioning?&lt;/strong&gt; Migration strategies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explain sharding in MongoDB&lt;/strong&gt; — when to use it?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What's the difference between replica set and sharding?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to optimize aggregation pipeline performance?&lt;/strong&gt; &lt;code&gt;$match&lt;/code&gt; early, indexes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explain the aggregation stages:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;$match&lt;/code&gt;, &lt;code&gt;$group&lt;/code&gt;, &lt;code&gt;$project&lt;/code&gt;, &lt;code&gt;$sort&lt;/code&gt;, &lt;code&gt;$limit&lt;/code&gt;, &lt;code&gt;$skip&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;$lookup&lt;/code&gt; (joins), &lt;code&gt;$unwind&lt;/code&gt;, &lt;code&gt;$addFields&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to implement geospatial queries?&lt;/strong&gt; 2dsphere indexes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What's the difference between:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;javascript&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`{ $set: { name: 'John' } }
{ name: 'John' }`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;code&gt;In update operations.&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Explain write concerns in MongoDB&lt;/strong&gt; — w, j, wtimeout.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;How to handle large file storage?&lt;/strong&gt; GridFS.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;What's the difference between &lt;code&gt;updateOne&lt;/code&gt;, &lt;code&gt;updateMany&lt;/code&gt;, &lt;code&gt;replaceOne&lt;/code&gt;?&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Implement soft delete with Mongoose&lt;/strong&gt; — plugin approach.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;How to implement data auditing?&lt;/strong&gt; Timestamp tracking, change history.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Explain the Mongoose middleware&lt;/strong&gt; — pre/post hooks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;What's the difference between:&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;javascript&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`schema.virtual()
schema.method()
schema.static()`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Authentication / Authorization Questions&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Explain JWT authentication flow.&lt;/li&gt;
&lt;li&gt;Difference between access token and refresh token.&lt;/li&gt;
&lt;li&gt;How to secure API routes in Express using JWT?&lt;/li&gt;
&lt;li&gt;How to implement role-based access control (RBAC) in Express?&lt;/li&gt;
&lt;li&gt;How to store JWT securely on client-side?&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Auth Advanced &amp;amp; Tricky&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;What's inside a JWT token?&lt;/strong&gt; Header, payload, signature — explain each.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to handle token refresh without logout?&lt;/strong&gt; Refresh token rotation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What's the difference between stateless and stateful authentication?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement OAuth 2.0 flow&lt;/strong&gt; — authorization code grant.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to prevent JWT replay attacks?&lt;/strong&gt; Nonce, jti claim.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Explain the difference between httpOnly and secure cookies.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to implement multi-factor authentication (MFA)?&lt;/strong&gt; TOTP algorithm.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What's the difference between authentication and authorization?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to implement API key authentication?&lt;/strong&gt; Rate limiting per key.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explain session-based authentication&lt;/strong&gt; — vs JWT comparison.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to handle password reset securely?&lt;/strong&gt; Token expiration, one-time use.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What is bcrypt and why use it?&lt;/strong&gt; Salting, hashing rounds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement permission-based access control&lt;/strong&gt; — granular permissions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to secure refresh tokens?&lt;/strong&gt; Rotation, revocation strategies.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What's the difference between Bearer token and API key?&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Scenario-Based / Practical Questions&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Async/Await vs Promises in error handling — reusable async wrapper.&lt;/li&gt;
&lt;li&gt;MongoDB slow query on 1 million+ documents — how to optimize?&lt;/li&gt;
&lt;li&gt;User token expired — how to handle refresh token scenario?&lt;/li&gt;
&lt;li&gt;Multiple users uploading large files simultaneously — backend crash scenario, optimization.&lt;/li&gt;
&lt;li&gt;Aggregation: Top 3 users with highest total orders in last month.&lt;/li&gt;
&lt;li&gt;Public API exposed — prevent DDOS / brute force attacks using rate limiting.&lt;/li&gt;
&lt;li&gt;Express app running slow under load — how to debug performance issues.&lt;/li&gt;
&lt;li&gt;You need to migrate MongoDB schema without downtime — approach?&lt;/li&gt;
&lt;li&gt;Implement search functionality in MongoDB with text indexes.&lt;/li&gt;
&lt;li&gt;How to implement soft delete (logical delete) in MongoDB.&lt;/li&gt;
&lt;li&gt;Implement caching in Node.js for frequently accessed DB data (Redis / memory).&lt;/li&gt;
&lt;li&gt;Scenario: Real-time notifications using Node.js and MongoDB — approach.&lt;/li&gt;
&lt;li&gt;Scenario: File upload + image processing pipeline — handle asynchronously.&lt;/li&gt;
&lt;li&gt;Scenario: Multiple microservices interacting with one MongoDB — how to maintain consistency?&lt;/li&gt;
&lt;li&gt;Scenario: Multi-tenancy in Node.js + MongoDB application.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Extreme Scenario-Based Questions (Real Production Issues)&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Your API suddenly returns 502 Bad Gateway for all requests&lt;/strong&gt; — where do you start debugging?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Memory usage keeps increasing in production Node.js app&lt;/strong&gt; — hits 2GB and crashes. How to debug?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database connection pool exhausted&lt;/strong&gt; — 100 concurrent users, all waiting. What's wrong?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Race condition in checkout system&lt;/strong&gt; — two users bought last item. How to prevent?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MongoDB aggregation taking 30+ seconds on 10M documents&lt;/strong&gt; — optimize without changing schema.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JWT token size causing performance issues&lt;/strong&gt; — payload too large. Solutions?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API rate limiter blocking legitimate users&lt;/strong&gt; — shared IP (corporate network). How to handle?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bulk email sending causing Express app to freeze&lt;/strong&gt; — 10,000 emails. Architecture solution?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;File upload fails for files &amp;gt; 50MB&lt;/strong&gt; — timeout errors. Complete solution?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Redis cache hit rate is 5%&lt;/strong&gt; — supposed to be 80%+. What's wrong?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mongoose query returns all 1M documents instead of paginated results&lt;/strong&gt; — catastrophic error. Why?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WebSocket connections keep dropping every 60 seconds&lt;/strong&gt; — load balancer issue?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database indexes not being used&lt;/strong&gt; — explain query plan shows COLLSCAN. Debug process?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Concurrent API calls updating same document cause data loss&lt;/strong&gt; — optimistic locking solution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Authentication fails randomly for some users&lt;/strong&gt; — JWT verification errors. Debugging approach?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Image processing queue backed up&lt;/strong&gt; — 10,000 pending jobs. How to handle gracefully?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Circular dependency in Node.js modules&lt;/strong&gt; — causing undefined exports. How to resolve?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API returns stale data despite database updates&lt;/strong&gt; — caching issue. Multi-layer cache invalidation strategy?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Server crashes when processing CSV with 5M rows&lt;/strong&gt; — memory-efficient streaming solution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;N+1 query problem in GraphQL&lt;/strong&gt; — 1000 database queries for single request. Solutions?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WebSockets not scaling horizontally&lt;/strong&gt; — sticky sessions, Redis adapter solution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transaction deadlock in MongoDB&lt;/strong&gt; — two operations waiting for each other. Prevention?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CDN serving old JavaScript bundle&lt;/strong&gt; — aggressive caching. Cache busting strategies?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated tests passing but production failing&lt;/strong&gt; — environment differences. Investigation steps?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API response time increased from 100ms to 5s overnight&lt;/strong&gt; — no code changes. What to check?&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;System Design &amp;amp; Architecture Questions&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Design a URL shortener&lt;/strong&gt; (like bit.ly) — complete backend architecture.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Design a rate limiter&lt;/strong&gt; — support distributed systems.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Design a real-time chat application&lt;/strong&gt; — WebSockets, scaling strategy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Design a file storage system&lt;/strong&gt; (like Dropbox) — chunking, deduplication.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Design a notification system&lt;/strong&gt; — email, SMS, push notifications.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Design an e-commerce cart system&lt;/strong&gt; — handle race conditions, inventory management.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Design a job queue system&lt;/strong&gt; — Bull, Redis, failure handling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Design an analytics dashboard&lt;/strong&gt; — handling time-series data efficiently.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Design a payment gateway integration&lt;/strong&gt; — security, idempotency.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Design a microservices architecture for a blog platform&lt;/strong&gt; — service boundaries, communication.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Performance &amp;amp; Optimization Questions&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;How to optimize a Next.js app that has 3-second initial load time?&lt;/strong&gt; Step-by-step approach.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API endpoint taking 10 seconds to respond&lt;/strong&gt; — profiling and optimization strategy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;React app re-rendering 100 times on single user action&lt;/strong&gt; — identify and fix.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MongoDB query using 4GB of RAM&lt;/strong&gt; — aggregation optimization techniques.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Node.js app using 100% CPU&lt;/strong&gt; — identify bottleneck without production downtime.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement caching strategy for REST API&lt;/strong&gt; — cache invalidation, TTL strategies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to reduce Docker image size from 2GB to 200MB?&lt;/strong&gt; Best practices.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optimize bundle size in React app&lt;/strong&gt; — tree shaking, code splitting, dynamic imports.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database connection pool sizing&lt;/strong&gt; — how to determine optimal pool size?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement database read replicas&lt;/strong&gt; — read/write split in Node.js application.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;DevOps &amp;amp; Deployment Questions&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Explain CI/CD pipeline for Node.js application&lt;/strong&gt; — GitHub Actions, Jenkins.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero-downtime deployment strategy&lt;/strong&gt; — blue-green, canary deployment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to handle environment variables securely?&lt;/strong&gt; Secrets management.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explain Docker multi-stage builds&lt;/strong&gt; — optimize image layers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to monitor Node.js app in production?&lt;/strong&gt; PM2, New Relic, Prometheus.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement health check endpoint&lt;/strong&gt; — readiness vs liveness probes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to handle database migrations in production?&lt;/strong&gt; Rollback strategy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explain horizontal vs vertical scaling&lt;/strong&gt; — when to use each?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to implement logging in distributed systems?&lt;/strong&gt; Centralized logging (ELK stack).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Container orchestration&lt;/strong&gt; — Kubernetes basics for Node.js apps.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Code Review &amp;amp; Best Practices Questions&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Review this code — find all issues:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;javascript&lt;/p&gt;

&lt;p&gt;&lt;code&gt;app.get('/users/:id', (req, res) =&amp;gt; {&lt;br&gt;
     User.findById(req.params.id).then(user =&amp;gt; {&lt;br&gt;
       res.json(user);&lt;br&gt;
     });&lt;br&gt;
   });&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;What's wrong with this Mongoose schema?&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;javascript&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const userSchema = new Schema({&lt;br&gt;
     email: String,&lt;br&gt;
     password: String&lt;br&gt;
   });&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Review this React component:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;javascript&lt;/p&gt;

&lt;p&gt;&lt;code&gt;function List({ items }) {&lt;br&gt;
     return items.map(item =&amp;gt; &amp;lt;div&amp;gt;{item.name}&amp;lt;/div&amp;gt;);&lt;br&gt;
   }&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;What's the security issue here?&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;javascript&lt;/p&gt;

&lt;p&gt;&lt;code&gt;app.get('/search', (req, res) =&amp;gt; {&lt;br&gt;
     const query = req.query.q;&lt;br&gt;
     db.collection('posts').find({ $where: query });&lt;br&gt;
   });&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Identify the performance problem:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;javascript&lt;/p&gt;

&lt;p&gt;&lt;code&gt;useEffect(() =&amp;gt; {&lt;br&gt;
     const data = expensiveOperation();&lt;br&gt;
     setData(data);&lt;br&gt;
   });&lt;/code&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Testing Questions&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;How to test async Express routes?&lt;/strong&gt; Jest, Supertest.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Difference between unit, integration, and E2E tests&lt;/strong&gt; — examples for each.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to mock MongoDB in tests?&lt;/strong&gt; mongodb-memory-server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testing React components&lt;/strong&gt; — React Testing Library best practices.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to test private functions?&lt;/strong&gt; Should you test them?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement test coverage&lt;/strong&gt; — what percentage is ideal?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to test error scenarios?&lt;/strong&gt; Error boundaries, API failures.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testing WebSocket connections&lt;/strong&gt; — approach and tools.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to handle flaky tests?&lt;/strong&gt; Identification and fixes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test database transactions&lt;/strong&gt; — rollback after each test.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Bonus: Algorithm &amp;amp; Data Structure Questions&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Implement LRU Cache&lt;/strong&gt; — O(1) get and put.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Two Sum problem&lt;/strong&gt; — optimal solution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reverse a linked list&lt;/strong&gt; — iterative and recursive.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validate balanced parentheses&lt;/strong&gt; — stack approach.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Find duplicate in array&lt;/strong&gt; — without extra space.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement debounce and throttle&lt;/strong&gt; — from scratch.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Binary search&lt;/strong&gt; — find element in sorted array.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Merge two sorted arrays&lt;/strong&gt; — in-place.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement a trie (prefix tree)&lt;/strong&gt; — autocomplete use case.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Detect cycle in linked list&lt;/strong&gt; — Floyd's algorithm.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>webdev</category>
      <category>node</category>
      <category>express</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
