| 1 | What does 'yield return' do inside a method, and how does it turn an ordinary method into an iterator? C# › Iterators & yield return | C# | Iterators & yield return | Beginner |
| 2 | Why is a method using 'yield return' considered LAZY, and what does that mean for when its code actually executes? C# › Iterators & yield return | C# | Iterators & yield return | Beginner |
| 3 | How would you implement a custom IEnumerable<T> on your own class using yield return, letting it support foreach? C# › Iterators & yield return | C# | Iterators & yield return | Intermediate |
| 4 | How does 'yield break' work, and how does it differ from a plain 'return' statement inside a regular method? C# › Iterators & yield return | C# | Iterators & yield return | Intermediate |
| 5 | How would you implement a custom lazy 'Where' and 'Select' from scratch using yield return, mirroring how LINQ actually works internally? C# › Iterators & yield return | C# | Iterators & yield return | Advanced |
| 6 | How would you implement infinite lazy sequence generation using yield return, and why is this safe despite never 'finishing'? C# › Iterators & yield return | C# | Iterators & yield return | Advanced |
| 7 | How would you combine yield return with async/await to build an IAsyncEnumerable<T>-producing async iterator method? C# › Iterators & yield return | C# | Iterators & yield return | Advanced |
| 8 | How does an iterator method interact with try/finally, and when does the finally block actually execute given the method's lazy, on-demand nature? C# › Iterators & yield return | C# | Iterators & yield return | Intermediate |
| 9 | How does the compiler-generated state machine for an iterator method actually work internally, and what class does it implement? C# › Iterators & yield return | C# | Iterators & yield return | Advanced |
| 10 | How would you write a custom iterator that safely handles resource cleanup for a lazily-enumerated database cursor, ensuring the connection is closed even if enumeration is abandoned early? C# › Iterators & yield return | C# | Iterators & yield return | Advanced |
| 11 | How does yield pause and resume execution, and what does it return to the caller? JavaScript › Iterators & Generators | JavaScript | Iterators & Generators | Intermediate |
| 12 | How does the 'yield return'-based lazy evaluation of collections (like LINQ or a custom iterator) differ from eagerly materializing a full collection, in terms of memory usage? C# › Collections | C# | Collections | Advanced |
| 13 | How does 'yield from' delegate iteration to a sub-generator, and what does it return as its own expression value? Python › Comprehensions & Generators | Python | Comprehensions & Generators | Advanced |
| 14 | What is the difference between File.ReadAllLines() and File.ReadLines() in terms of memory usage? C# › File I/O & Streams | C# | File I/O & Streams | Beginner |
| 15 | What restrictions does the C# compiler enforce on Span<T> because it's a 'ref struct'? C# › Arrays, Span<T> & Memory<T> | C# | Arrays, Span<T> & Memory<T> | Intermediate |
| 16 | How does Queue<T> differ from Stack<T> in terms of the order items are removed? C# › Collections | C# | Collections | Intermediate |
| 17 | How does variable capture (closures) work in a C# lambda expression, and what pitfall occurs when capturing a loop variable? C# › Delegates, Events & Lambdas | C# | Delegates, Events & Lambdas | Intermediate |
| 18 | How would you use Span<T> to implement an in-place array reversal or sorting algorithm without allocating a temporary array? C# › Arrays, Span<T> & Memory<T> | C# | Arrays, Span<T> & Memory<T> | Advanced |
| 19 | How do IAsyncEnumerable<T> and 'await foreach' let you consume an asynchronous stream of values one at a time? C# › Asynchronous Programming | C# | Asynchronous Programming | Advanced |
| 20 | How would you use an indexer together with a custom enumerator (implementing IEnumerable) to build a fully iterable, indexable custom collection class? C# › Indexers & Operator Overloading | C# | Indexers & Operator Overloading | Advanced |
| 21 | How would you write a custom LINQ extension method that integrates seamlessly with the standard method-chaining style, like a 'DistinctBy' before it existed natively? C# › LINQ | C# | LINQ | Advanced |