| 1 | How do you overload the '+' operator to support adding two custom objects together? C# › Indexers & Operator Overloading | C# | Indexers & Operator Overloading | Beginner |
| 2 | Which operators can be overloaded in C#, and which ones (like && and ||) generally CANNOT be overloaded directly? C# › Indexers & Operator Overloading | C# | Indexers & Operator Overloading | Intermediate |
| 3 | How do you overload comparison operators like < and >, and what consistency rule must they maintain relative to Equals()? C# › Indexers & Operator Overloading | C# | Indexers & Operator Overloading | Intermediate |
| 4 | How do you define a custom implicit or explicit conversion operator between your type and another type? C# › Indexers & Operator Overloading | C# | Indexers & Operator Overloading | Intermediate |
| 5 | How do you overload arithmetic operators like + and - using __add__ and __sub__? Python › Magic Methods & Operator Overloading | Python | Magic Methods & Operator Overloading | Intermediate |
| 6 | How does __contains__ let you customize the behavior of the 'in' operator? Python › Magic Methods & Operator Overloading | Python | Magic Methods & Operator Overloading | Intermediate |
| 7 | How do you overload the true/false operators to make a custom type usable directly in an 'if' statement or as a boolean condition? C# › Indexers & Operator Overloading | C# | Indexers & Operator Overloading | Advanced |
| 8 | How would you implement a fluent, chainable custom '+' operator overload for building an immutable Vector3 math library, and what performance consideration applies for structs? C# › Indexers & Operator Overloading | C# | Indexers & Operator Overloading | Advanced |
| 9 | How do you implement the 'checked' operator overload variant (introduced in C# 11) to provide overflow-checking behavior for a custom numeric type? C# › Indexers & Operator Overloading | C# | Indexers & Operator Overloading | Advanced |
| 10 | 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 |
| 11 | What is the difference between __str__ and __repr__? Python › Magic Methods & Operator Overloading | Python | Magic Methods & Operator Overloading | Beginner |
| 12 | What is an indexer, and how does it let a custom class support square-bracket syntax like an array? C# › Indexers & Operator Overloading | C# | Indexers & Operator Overloading | Beginner |
| 13 | What are 'magic methods' (dunder methods) in Python, and why are they called that? Python › Magic Methods & Operator Overloading | Python | Magic Methods & Operator Overloading | Beginner |
| 14 | How does __repr__ help with debugging when printing a list of custom objects? Python › Magic Methods & Operator Overloading | Python | Magic Methods & Operator Overloading | Beginner |
| 15 | What do __eq__ and __hash__ need to satisfy together, and what happens if you only override __eq__? Python › Magic Methods & Operator Overloading | Python | Magic Methods & Operator Overloading | Intermediate |
| 16 | How do __len__, __getitem__, and __setitem__ let a custom class act like a sequence or mapping? Python › Magic Methods & Operator Overloading | Python | Magic Methods & Operator Overloading | Intermediate |
| 17 | How does __call__ let an instance of a class be invoked like a function? Python › Magic Methods & Operator Overloading | Python | Magic Methods & Operator Overloading | Intermediate |
| 18 | How do comparison magic methods like __lt__, __le__, __gt__, and __ge__ support custom sorting? Python › Magic Methods & Operator Overloading | Python | Magic Methods & Operator Overloading | Intermediate |
| 19 | How do you implement custom attribute access with __getattr__ versus __getattribute__? Python › Magic Methods & Operator Overloading | Python | Magic Methods & Operator Overloading | Intermediate |
| 20 | How would you implement a multi-dimensional indexer, like a Matrix class supporting matrix[row, col] syntax? C# › Indexers & Operator Overloading | C# | Indexers & Operator Overloading | Advanced |
| 21 | 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 |
| 22 | How do context manager magic methods __enter__ and __exit__ work, and what does __exit__'s return value control? Python › Magic Methods & Operator Overloading | Python | Magic Methods & Operator Overloading | Advanced |
| 23 | What is the difference between __new__ and __init__, and when would you override __new__? Python › Magic Methods & Operator Overloading | Python | Magic Methods & Operator Overloading | Advanced |
| 24 | How does __bool__ (or the legacy __nonzero__) determine an object's truthiness, and what's the fallback if it's not defined? Python › Magic Methods & Operator Overloading | Python | Magic Methods & Operator Overloading | Advanced |
| 25 | How does __slots__ interact with magic methods and instance attribute storage? Python › Magic Methods & Operator Overloading | Python | Magic Methods & Operator Overloading | Advanced |
| 26 | What is a user-defined conversion operator? C++ › Casting & Conversions | C++ | Casting & Conversions | Advanced |
| 27 | How do you overload operator<< for a custom type? C++ › I/O Streams | C++ | I/O Streams | Advanced |
| 28 | What are C++ I/O streams? C++ › I/O Streams | C++ | I/O Streams | Beginner |
| 29 | What does the @dataclass decorator automatically generate for a class? Python › Dataclasses & NamedTuples | Python | Dataclasses & NamedTuples | Beginner |
| 30 | What does the @property decorator do, and how does it let a method be accessed like an attribute? Python › Descriptors & Properties | Python | Descriptors & Properties | Beginner |
| 31 | What is the difference between an iterable and an iterator in Python? Python › Iterators & the Iterator Protocol | Python | Iterators & the Iterator Protocol | Beginner |
| 32 | What is multiple inheritance in Python, and how does it differ from single inheritance? Python › Multiple Inheritance & MRO | Python | Multiple Inheritance & MRO | Beginner |
| 33 | Why must dictionary keys (and set elements) be hashable, and what makes an object hashable in Python? Python › Data Types & Structures | Python | Data Types & Structures | Intermediate |
| 34 | How do you make a dataclass immutable (read-only after creation) using frozen=True? Python › Dataclasses & NamedTuples | Python | Dataclasses & NamedTuples | Intermediate |
| 35 | How do you write a decorator as a CLASS instead of a function, implementing __call__? Python › Decorators | Python | Decorators | Intermediate |
| 36 | What is a descriptor, and which dunder methods define the descriptor protocol? Python › Descriptors & Properties | Python | Descriptors & Properties | Intermediate |
| 37 | What is the difference between a data descriptor and a non-data descriptor, and how does this affect attribute lookup priority? Python › Descriptors & Properties | Python | Descriptors & Properties | Intermediate |
| 38 | How does __set_name__ let a descriptor automatically learn the attribute name it's being assigned to on the owning class? Python › Descriptors & Properties | Python | Descriptors & Properties | Intermediate |
| 39 | How does @functools.wraps preserve metadata when writing decorators? Python › functools & Functional Programming Tools | Python | functools & Functional Programming Tools | Intermediate |
| 40 | How does functools.total_ordering reduce boilerplate for comparison methods? Python › functools & Functional Programming Tools | Python | functools & Functional Programming Tools | Intermediate |
| 41 | How does Python know whether to treat a for-in target as iterable, and what error occurs if it isn't? Python › Iterators & the Iterator Protocol | Python | Iterators & the Iterator Protocol | Intermediate |
| 42 | How does the built-in `object` class relate to every class's MRO, and why does it always appear last? Python › Multiple Inheritance & MRO | Python | Multiple Inheritance & MRO | Intermediate |
| 43 | How do you overload a member function on const? C++ › Const Correctness | C++ | Const Correctness | Advanced |
| 44 | What is argument-dependent lookup (ADL)? C++ › Namespaces | C++ | Namespaces | Advanced |
| 45 | How do you implement type-safe bit flags with enum class? C++ › Enums & Enum Classes | C++ | Enums & Enum Classes | Advanced |
| 46 | How does frozenset differ from a regular set, and what specific use case does its immutability enable? Python › Data Types & Structures | Python | Data Types & Structures | Advanced |
| 47 | How do you use dataclasses.field(compare=False) or field(repr=False) to exclude a specific field from the auto-generated __eq__ or __repr__? Python › Dataclasses & NamedTuples | Python | Dataclasses & NamedTuples | Advanced |
| 48 | How do you implement custom ordering (<, <=, >, >=) for a dataclass using order=True, and what constraint does it place on field comparison? Python › Dataclasses & NamedTuples | Python | Dataclasses & NamedTuples | Advanced |
| 49 | How do you implement a custom __eq__ or __hash__ on a dataclass while still benefiting from its other auto-generated methods? Python › Dataclasses & NamedTuples | Python | Dataclasses & NamedTuples | Advanced |
| 50 | How would you use dataclasses.replace() to create a modified copy of an immutable (frozen) dataclass instance? Python › Dataclasses & NamedTuples | Python | Dataclasses & NamedTuples | Advanced |
| 51 | When would you choose a NamedTuple over a @dataclass, and vice versa, given their overlapping use cases? Python › Dataclasses & NamedTuples | Python | Dataclasses & NamedTuples | Advanced |
| 52 | How does Python's own implementation of instance methods use the descriptor protocol to achieve automatic 'self' binding? Python › Descriptors & Properties | Python | Descriptors & Properties | Advanced |
| 53 | How does __class_getitem__ enable generic-looking syntax like MyClass[int]? Python › Metaclasses & Class Customization | Python | Metaclasses & Class Customization | Advanced |
| 54 | How does __instancecheck__ and __subclasscheck__ on a metaclass enable 'virtual subclassing' as used by collections.abc? Python › Metaclasses & Class Customization | Python | Metaclasses & Class Customization | Advanced |