| 1 | How would you use a memory profiler (or dotnet-counters / dotnet-gcdump) to diagnose excessive garbage collection pressure in a production .NET application? C# › Memory & Garbage Collection | C# | Memory & Garbage Collection | Advanced |
| 2 | How does garbage collection in .NET work, and what three phases does a collection cycle go through? C# › Memory & Garbage Collection | C# | Memory & Garbage Collection | Beginner |
| 3 | How would you use ArrayPool<T> to reduce garbage collection pressure in a high-throughput, buffer-allocating hot path? C# › Memory & Garbage Collection | C# | Memory & Garbage Collection | Advanced |
| 4 | How does garbage collection work in .NET? C# › Memory & Garbage Collection | C# | Memory & Garbage Collection | Beginner |
| 5 | What are .NET's garbage collection 'generations,' and what's the core assumption behind this design? C# › Memory & Garbage Collection | C# | Memory & Garbage Collection | Beginner |
| 6 | What is a memory leak in a garbage-collected language like C#, given that the GC handles cleanup automatically? C# › Memory & Garbage Collection | C# | Memory & Garbage Collection | Intermediate |
| 7 | What is the difference between the stack and the heap in .NET memory management? C# › Memory & Garbage Collection | C# | Memory & Garbage Collection | Beginner |
| 8 | How does the IDisposable pattern and the 'using' statement help manage UNMANAGED resources that the garbage collector doesn't automatically clean up? C# › Memory & Garbage Collection | C# | Memory & Garbage Collection | Intermediate |
| 9 | What causes managed memory leaks despite the GC? C# › Memory & Garbage Collection | C# | Memory & Garbage Collection | Advanced |
| 10 | What is a memory leak in JavaScript, given that it has automatic garbage collection? JavaScript › Memory Management & Garbage Collection | JavaScript | Memory Management & Garbage Collection | Beginner |
| 11 | How do context managers and the `del` statement relate to timely memory cleanup versus relying on garbage collection? Python › Memory Management & Garbage Collection | Python | Memory Management & Garbage Collection | Intermediate |
| 12 | What is the difference between Dispose and Finalize in C#, and when should each actually be used? C# › Memory & Garbage Collection | C# | Memory & Garbage Collection | Intermediate |
| 13 | What is the Large Object Heap (LOH), and why do objects allocated there behave differently from regular small objects? C# › Memory & Garbage Collection | C# | Memory & Garbage Collection | Advanced |
| 14 | How do WeakReference<T> objects work, and in what scenario would you use one instead of a normal strong reference? C# › Memory & Garbage Collection | C# | Memory & Garbage Collection | Advanced |
| 15 | What is the difference between managed and unmanaged resources? C# › Memory & Garbage Collection | C# | Memory & Garbage Collection | Beginner |
| 16 | What is the IDisposable pattern and why implement it? C# › Memory & Garbage Collection | C# | Memory & Garbage Collection | Intermediate |
| 17 | What is the difference between a finalizer and Dispose? C# › Memory & Garbage Collection | C# | Memory & Garbage Collection | Intermediate |
| 18 | What is boxing and unboxing, and why does it have a real performance cost? C# › Memory & Garbage Collection | C# | Memory & Garbage Collection | Intermediate |
| 19 | How do Span<T> and ArrayPool reduce GC pressure? C# › Memory & Garbage Collection | C# | Memory & Garbage Collection | Advanced |
| 20 | How does the difference between the Server GC and Workstation GC modes affect a .NET application's throughput and latency characteristics? C# › Memory & Garbage Collection | C# | Memory & Garbage Collection | Advanced |
| 21 | What is garbage collection in the JVM, and what fundamental problem does it solve compared to manual memory management (like in C/C++)? Java › Garbage Collection | Java | Garbage Collection | Beginner |
| 22 | What is the difference between the generational garbage collection strategy's 'young' and 'old' generations? JavaScript › Memory Management & Garbage Collection | JavaScript | Memory Management & Garbage Collection | Intermediate |
| 23 | How does mark-and-sweep garbage collection actually determine which objects are reachable? JavaScript › Memory Management & Garbage Collection | JavaScript | Memory Management & Garbage Collection | Advanced |
| 24 | How does Python primarily manage memory for objects? Python › Memory Management & Garbage Collection | Python | Memory Management & Garbage Collection | Beginner |
| 25 | How would you diagnose a memory leak in a Java application (where memory usage grows unboundedly despite garbage collection running) using heap dump analysis, and what common patterns cause 'leaks' in a garbage-collected language? Java › Garbage Collection | Java | Garbage Collection | Advanced |
| 26 | What does it mean for an object to be 'eligible for garbage collection' in terms of reachability from GC roots? Java › Garbage Collection | Java | Garbage Collection | Beginner |
| 27 | How does the modern .NET Span-based string.Split (via MemoryExtensions) or manual span-splitting reduce garbage collection pressure compared to string.Split()? C# › Arrays, Span<T> & Memory<T> | C# | Arrays, Span<T> & Memory<T> | Advanced |
| 28 | How does JavaScript decide when to free memory used by an object? JavaScript › Memory Management & Garbage Collection | JavaScript | Memory Management & Garbage Collection | Beginner |
| 29 | What does it mean that Python has 'automatic' memory management, and what's the trade-off compared to manual memory management in languages like C? Python › Memory Management & Garbage Collection | Python | Memory Management & Garbage Collection | Beginner |
| 30 | How can an unremoved event listener cause a memory leak? JavaScript › Memory Management & Garbage Collection | JavaScript | Memory Management & Garbage Collection | Intermediate |
| 31 | How does Python's generational garbage collector work, and why generations? Python › Memory Management & Garbage Collection | Python | Memory Management & Garbage Collection | Intermediate |
| 32 | What is the sys.getsizeof() function, and what are its limitations for measuring memory usage? Python › Memory Management & Garbage Collection | Python | Memory Management & Garbage Collection | Intermediate |
| 33 | How does the gc module let you inspect and debug memory leaks caused by uncollectable objects? Python › Memory Management & Garbage Collection | Python | Memory Management & Garbage Collection | Intermediate |
| 34 | How do mutable default arguments create a subtle memory and correctness pitfall related to object lifetime? Python › Memory Management & Garbage Collection | Python | Memory Management & Garbage Collection | Intermediate |
| 35 | How does the tracemalloc module help track where memory is being allocated in a running program? Python › Memory Management & Garbage Collection | Python | Memory Management & Garbage Collection | Intermediate |
| 36 | What are the four types of references in java.lang.ref (strong, soft, weak, phantom), and how does each affect an object's eligibility for garbage collection? Java › Garbage Collection | Java | Garbage Collection | Intermediate |
| 37 | How can a growing array used as a cache with no eviction policy become a memory leak? JavaScript › Memory Management & Garbage Collection | JavaScript | Memory Management & Garbage Collection | Advanced |
| 38 | Why can setInterval() be a subtle source of memory leaks, and how do you avoid it? JavaScript › Memory Management & Garbage Collection | JavaScript | Memory Management & Garbage Collection | Advanced |
| 39 | How does using WeakMap/WeakSet as a design choice actively prevent certain classes of memory leaks? JavaScript › Memory Management & Garbage Collection | JavaScript | Memory Management & Garbage Collection | Advanced |
| 40 | How does the weakref module help avoid reference cycles and memory leaks? Python › Memory Management & Garbage Collection | Python | Memory Management & Garbage Collection | Advanced |
| 41 | How does object interning (like small integer caching and string interning) affect memory and identity comparisons? Python › Memory Management & Garbage Collection | Python | Memory Management & Garbage Collection | Advanced |
| 42 | How can generators and iterators help reduce peak memory usage compared to building full lists? Python › Memory Management & Garbage Collection | Python | Memory Management & Garbage Collection | Advanced |
| 43 | What is memory fragmentation in the context of Python's object allocator, and how does pymalloc address it for small objects? Python › Memory Management & Garbage Collection | Python | Memory Management & Garbage Collection | Advanced |
| 44 | What is a reference cycle, and why can't simple reference counting free it? Python › Memory Management & Garbage Collection | Python | Memory Management & Garbage Collection | Intermediate |
| 45 | How do closures unintentionally keep large objects alive longer than expected? JavaScript › Memory Management & Garbage Collection | JavaScript | Memory Management & Garbage Collection | Intermediate |
| 46 | How would you use Chrome DevTools' heap snapshot comparison to find a leak's source? JavaScript › Memory Management & Garbage Collection | JavaScript | Memory Management & Garbage Collection | Advanced |
| 47 | Why is __del__ (the finalizer method) discouraged for critical cleanup logic, and what problems can it cause? Python › Memory Management & Garbage Collection | Python | Memory Management & Garbage Collection | Advanced |
| 48 | How do circular references between objects with __del__ methods behave differently in Python 3.4+ compared to earlier versions? Python › Memory Management & Garbage Collection | Python | Memory Management & Garbage Collection | Advanced |
| 49 | How do the different modern garbage collectors (G1, ZGC, Shenandoah) differ in their approach to minimizing GC pause times, and when would you choose one over the default? Java › Garbage Collection | Java | Garbage Collection | Advanced |
| 50 | How does the -XX:+HeapDumpOnOutOfMemoryError flag combined with the Eclipse Memory Analyzer's 'Leak Suspects' report help quickly triage a production OutOfMemoryError, and what's the typical first thing to check in the resulting analysis? Java › Garbage Collection | Java | Garbage Collection | Intermediate |
| 51 | How does 'stackalloc' work together with Span<T> to allocate memory on the stack instead of the heap? C# › Arrays, Span<T> & Memory<T> | C# | Arrays, Span<T> & Memory<T> | Advanced |
| 52 | How does the generational hypothesis (most objects die young) inform the JVM's generational heap structure (young generation, old generation), and how does a minor GC differ from a major/full GC? Java › Garbage Collection | Java | Garbage Collection | Intermediate |
| 53 | How would you profile and reduce excessive garbage collection pauses affecting application latency? .NET › Diagnostics & Performance | .NET | Diagnostics & Performance | Advanced |
| 54 | What is escape analysis, and how does it enable the JIT compiler to perform stack allocation or scalar replacement for objects that don't actually need heap allocation, reducing GC pressure? Java › Garbage Collection | Java | Garbage Collection | Advanced |
| 55 | How does Metaspace (replacing PermGen since Java 8) store class metadata, and what specific configuration and failure modes differ from the old PermGen model? Java › Garbage Collection | Java | Garbage Collection | Advanced |
| 56 | What is Span<T> and what core performance problem does it solve? C# › Arrays, Span<T> & Memory<T> | C# | Arrays, Span<T> & Memory<T> | Beginner |
| 57 | What is a memory dump, and how do you capture and analyze one for a .NET application experiencing high memory usage or a crash? .NET › Diagnostics & Performance | .NET | Diagnostics & Performance | Intermediate |
| 58 | What is the Large Object Heap (LOH), and why do objects larger than 85,000 bytes behave differently in the garbage collector? .NET › Diagnostics & Performance | .NET | Diagnostics & Performance | Intermediate |
| 59 | How do you configure a .NET container to respect memory and CPU limits set by the container orchestrator (like Kubernetes resource limits)? .NET › Docker & Containerization | .NET | Docker & Containerization | Intermediate |
| 60 | Why is buffering an entire large file upload in memory (via IFormFile) problematic, and how does streaming avoid this issue? ASP.NET Core › File Uploads & Streaming Large Files | ASP.NET Core | File Uploads & Streaming Large Files | Intermediate |
| 61 | What is the difference between Error and Exception in Java's Throwable hierarchy, and why should application code generally avoid catching Error subclasses like OutOfMemoryError or StackOverflowError? Java › Exceptions | Java | Exceptions | Intermediate |
| 62 | How does an inner class's implicit reference to its outer instance create a potential memory leak risk, and in what specific scenario does this become a genuine practical concern? Java › Inner Classes & Anonymous Classes | Java | Inner Classes & Anonymous Classes | Intermediate |
| 63 | How would you implement a Least Recently Used (LRU) cache in Node.js, and why is eviction necessary for an in-memory cache? Node.js › Caching | Node.js | Caching | Intermediate |
| 64 | How do you use Node's built-in heap snapshot capability to diagnose a suspected memory leak? Node.js › Debugging & Diagnostics | Node.js | Debugging & Diagnostics | Intermediate |
| 65 | What is process.memoryUsage(), and how would you use it to monitor a Node.js application's memory consumption? Node.js › Global Objects & the process Object | Node.js | Global Objects & the process Object | Intermediate |
| 66 | How do you properly clean up event listeners to avoid memory leaks? JavaScript › DOM & Events | JavaScript | DOM & Events | Advanced |
| 67 | How would you implement the 'weak event pattern' to prevent event subscribers from causing a memory leak by keeping the publisher alive indefinitely? C# › Delegates, Events & Lambdas | C# | Delegates, Events & Lambdas | Advanced |
| 68 | How would you implement memory-mapped file access using MemoryMappedFile for efficient random access to a very large file? C# › File I/O & Streams | C# | File I/O & Streams | Advanced |
| 69 | How do you use memory_profiler (or tracemalloc from the standard library) to identify a memory leak's source in a Python application? Python › Debugging & Profiling | Python | Debugging & Profiling | Advanced |
| 70 | How would you profile memory allocations specifically (not just CPU time) to find which objects are consuming the most memory in a running process? Python › Debugging & Profiling | Python | Debugging & Profiling | Advanced |
| 71 | How does the CLR ensure type safety and memory safety, and what categories of bugs does this prevent compared to unmanaged languages like C++? .NET › CLR & Runtime | .NET | CLR & Runtime | Advanced |
| 72 | How does the dotnet-gcdump tool help diagnose managed memory leaks, and how do you analyze the resulting heap snapshot? .NET › Diagnostics & Performance | .NET | Diagnostics & Performance | Advanced |
| 73 | How does the DI container's disposal behavior work for IDisposable services registered as Transient, and why can this cause unexpected memory retention? ASP.NET Core › Dependency Injection | ASP.NET Core | Dependency Injection | Advanced |
| 74 | How does the Java Memory Model's happens-before relationship formally define when changes made by one thread are guaranteed to be visible to another thread, and what role does the volatile keyword play? Java › Concurrency & Threads | Java | Concurrency & Threads | Advanced |
| 75 | What is a memory leak in the context of a long-running Node.js server, and what are the most common causes? Node.js › Advanced Node.js | Node.js | Advanced Node.js | Advanced |
| 76 | How would you implement an efficient in-place algorithm on a 2D array, such as rotating a matrix 90 degrees, while minimizing extra memory allocation? Java › Arrays & Multidimensional Arrays | Java | Arrays & Multidimensional Arrays | Advanced |
| 77 | How does the JVM lay out array objects in memory, including the array header overhead, and how does this affect memory efficiency for very large arrays of primitives versus boxed wrapper types? Java › Arrays & Multidimensional Arrays | Java | Arrays & Multidimensional Arrays | Advanced |
| 78 | What is the difference between reading a file with .read(), .readline(), and .readlines()? Python › File I/O & Context Managers | Python | File I/O & Context Managers | Beginner |
| 79 | What is the difference between functools.cache and functools.lru_cache? Python › functools & Functional Programming Tools | Python | functools & Functional Programming Tools | Beginner |
| 80 | What is the CLR (Common Language Runtime), and what are its core responsibilities? .NET › CLR & Runtime | .NET | CLR & Runtime | Beginner |
| 81 | What tools does .NET provide for basic application diagnostics, and what is dotnet-trace used for? .NET › Diagnostics & Performance | .NET | Diagnostics & Performance | Beginner |
| 82 | What's the difference between slice() and subarray() on a TypedArray? JavaScript › ArrayBuffer, TypedArrays & Binary Data | JavaScript | ArrayBuffer, TypedArrays & Binary Data | Intermediate |
| 83 | What are the size limits of localStorage compared to IndexedDB? JavaScript › Browser Storage & Web APIs | JavaScript | Browser Storage & Web APIs | Intermediate |
| 84 | What is a WeakMap and why can't you iterate over its keys? JavaScript › Map, Set, WeakMap & WeakSet | JavaScript | Map, Set, WeakMap & WeakSet | Intermediate |
| 85 | When would you choose a WeakSet over a Set? JavaScript › Map, Set, WeakMap & WeakSet | JavaScript | Map, Set, WeakMap & WeakSet | Intermediate |
| 86 | What is the performance consideration when using Enum.HasFlag() versus a direct bitwise AND check? C# › Enums & Flags | C# | Enums & Flags | Intermediate |
| 87 | What is a generator expression, and how does it differ syntactically and behaviorally from a list comprehension? Python › Comprehensions & Generators | Python | Comprehensions & Generators | Intermediate |
| 88 | How do you protect shared mutable state from race conditions when using multiple threads, using threading.Lock? Python › Concurrency (asyncio/threading/multiprocessing) | Python | Concurrency (asyncio/threading/multiprocessing) | Intermediate |
| 89 | What's the difference between shallow copy and deep copy for a nested data structure, and which functions perform each? Python › Data Types & Structures | Python | Data Types & Structures | Intermediate |
| 90 | How does Python's module import system avoid re-executing a module multiple times when imported from different places? Python › Modules & Packaging | Python | Modules & Packaging | Intermediate |
| 91 | How does the CLR's type system distinguish between value types and reference types, and where is each typically allocated? .NET › CLR & Runtime | .NET | CLR & Runtime | Intermediate |
| 92 | What does the `unsafe` keyword and pointer usage in C# allow, and why would a developer opt into it? .NET › CLR & Runtime | .NET | CLR & Runtime | Intermediate |
| 93 | What is the difference between the CLR's Server GC and Workstation GC modes, and how do you choose between them? .NET › CLR & Runtime | .NET | CLR & Runtime | Intermediate |
| 94 | What is BenchmarkDotNet, and why is it preferred over manual Stopwatch-based timing for measuring code performance? .NET › Diagnostics & Performance | .NET | Diagnostics & Performance | Intermediate |
| 95 | How would you generate and interpret a CPU profile for a Node.js application using the built-in --prof flag? Node.js › Performance Optimization & Profiling | Node.js | Performance Optimization & Profiling | Intermediate |
| 96 | How can you grow an ArrayBuffer after it's been created? JavaScript › ArrayBuffer, TypedArrays & Binary Data | JavaScript | ArrayBuffer, TypedArrays & Binary Data | Advanced |
| 97 | How do you convert a Node.js Readable stream into an async iterable? JavaScript › Async Iterators & Streams | JavaScript | Async Iterators & Streams | Advanced |
| 98 | How do you check available and used storage quota in a browser? JavaScript › Browser Storage & Web APIs | JavaScript | Browser Storage & Web APIs | Advanced |
| 99 | How do WeakRef and FinalizationRegistry extend the weak-reference capabilities beyond WeakMap/WeakSet? JavaScript › Map, Set, WeakMap & WeakSet | JavaScript | Map, Set, WeakMap & WeakSet | Advanced |
| 100 | How does the compiler transform an async method into a state machine, and why does this matter for understanding performance? C# › Asynchronous Programming | C# | Asynchronous Programming | Advanced |
| 101 | What is ValueTask<T> and when should you use it instead of Task<T> for performance? C# › Asynchronous Programming | C# | Asynchronous Programming | Advanced |
| 102 | How does a lambda expression get compiled differently when it captures NO outer variables versus when it DOES capture outer state? C# › Delegates, Events & Lambdas | C# | Delegates, Events & Lambdas | Advanced |
| 103 | What causes a 'captive dependency' bug, and how does ASP.NET Core's DI container detect and prevent it? C# › Dependency Injection & IoC Principles | C# | Dependency Injection & IoC Principles | Advanced |
| 104 | How does exception performance (throwing/catching) compare to normal control flow, and why should exceptions generally NOT be used for expected, routine control flow? C# › Exception Handling | C# | Exception Handling | Advanced |
| 105 | How do generic type parameters interact with static members, and why does each closed generic type get its OWN independent set of static field values? C# › Generics | C# | Generics | Advanced |
| 106 | How would you implement a generic, reusable object pool using generic constraints to ensure poolable objects can be properly reset? C# › Generics | C# | Generics | Advanced |
| 107 | How does lazy evaluation in a chained sequence of generator expressions actually process elements, one at a time end-to-end, without intermediate lists? Python › Comprehensions & Generators | Python | Comprehensions & Generators | Advanced |
| 108 | How would you implement a producer-consumer pattern combining a thread-safe queue.Queue with multiple worker threads? Python › Concurrency (asyncio/threading/multiprocessing) | Python | Concurrency (asyncio/threading/multiprocessing) | Advanced |
| 109 | How does Python's small integer caching (interning) affect identity comparisons ('is') versus equality comparisons ('==') for integers? Python › Data Types & Structures | Python | Data Types & Structures | Advanced |
| 110 | How does Python's list implementation achieve amortized O(1) append performance despite lists being dynamically resizable arrays under the hood? Python › Data Types & Structures | Python | Data Types & Structures | Advanced |
| 111 | How would you implement a lazy, cached property using a custom descriptor (or functools.cached_property) that only computes its value once? Python › Descriptors & Properties | Python | Descriptors & Properties | Advanced |
| 112 | How would you use a WeakKeyDictionary inside a descriptor to store per-instance data without relying on the instance's own __dict__ or requiring a dedicated __slots__ entry? Python › Descriptors & Properties | Python | Descriptors & Properties | Advanced |
| 113 | What is functools.cached_property and how does it differ from @property combined with manual caching? Python › functools & Functional Programming Tools | Python | functools & Functional Programming Tools | Advanced |
| 114 | Why is caution needed when applying @lru_cache directly to instance methods? Python › functools & Functional Programming Tools | Python | functools & Functional Programming Tools | Advanced |
| 115 | How does itertools.tee let you iterate over the same iterator multiple times independently? Python › Iterators & the Iterator Protocol | Python | Iterators & the Iterator Protocol | Advanced |
| 116 | How do RotatingFileHandler and TimedRotatingFileHandler prevent log files from growing unbounded? Python › Logging | Python | Logging | Advanced |
| 117 | How do __iadd__ and other in-place operator methods (__isub__, __imul__) differ from their non-in-place counterparts? Python › Magic Methods & Operator Overloading | Python | Magic Methods & Operator Overloading | Advanced |
| 118 | How does __slots__ interact with magic methods and instance attribute storage? Python › Magic Methods & Operator Overloading | Python | Magic Methods & Operator Overloading | Advanced |
| 119 | How does Span<T> improve performance for buffer and array manipulation compared to traditional array slicing? .NET › CLR & Runtime | .NET | CLR & Runtime | Advanced |
| 120 | How does the DI container's disposal behavior work for IDisposable and IAsyncDisposable services across different lifetimes? .NET › Dependency Injection | .NET | Dependency Injection | Advanced |
| 121 | How does async/await performance compare to synchronous code, and what overhead does the async state machine introduce? .NET › Diagnostics & Performance | .NET | Diagnostics & Performance | Advanced |
| 122 | How does EF Core's change tracking work, and what is the difference between tracked and no-tracking queries? .NET › Entity Framework Core & Data Access | .NET | Entity Framework Core & Data Access | Advanced |
| 123 | How would you implement a custom ClassLoader to load classes from a non-standard source, such as loading plugin JARs dynamically at runtime, and what challenges arise with class unloading? Java › Class Loading & Bytecode Verification | Java | Class Loading & Bytecode Verification | Advanced |
| 124 | What is V8's hidden class mechanism, and why does it matter for writing performant Node.js code? Node.js › Advanced Node.js | Node.js | Advanced Node.js | Advanced |
| 125 | What is the default maximum listener limit on an EventEmitter, and why does Node.js warn when it's exceeded? Node.js › Events & EventEmitter | Node.js | Events & EventEmitter | Advanced |
| 126 | What is JIT (Just-In-Time) compilation deoptimization in V8, and how can you detect when it's hurting a hot function's performance? Node.js › Performance Optimization & Profiling | Node.js | Performance Optimization & Profiling | Advanced |