-
Overview Memory management is the process of controlling and coordinating computer memory, assigning portions (blocks) to various running programs to optimize overall system performance. Core Concepts The Stack: Stores local variables and function call frames. Fast access, automatic allocation/deallocation. Limited size (can lead to Stack Overflow). The Heap: Stores objects, arrays, and dynamically allocated memory.…
-
Overview Inheritance and Polymorphism are two core pillars of OOP that allow developers to create generic interfaces and reuse code efficiently. Core Concepts Inheritance: A mechanism where a new class (Derived/Child) inherits properties and methods from an existing class (Base/Parent). This represents an “is-a” relationship. Method Overriding: When a child class provides a specific implementation…
-
Overview Design patterns are typical solutions to common problems in software design. They are like blueprints that you can customize to solve a particular design problem in your code. They are not finished designs, but templates for how to solve a problem. Core Concepts Creational Patterns: Deal with object creation mechanisms, trying to solve the…
-
Overview While often used interchangeably, concurrency and parallelism are different. Concurrency is about dealing with many things at once (structure), while Parallelism is about doing many things at once (execution). Core Concepts Process vs. Thread: Process: An independent program with its own memory space. Thread: A “lightweight” unit of execution within a process; threads share…
-
Overview API (Application Programming Interface) design is the process of creating a set of rules and protocols that allow different software components to communicate with each other. A well-designed API is intuitive, maintainable, and scalable. Core Concepts REST (Representational State Transfer): Statelessness: Each request from a client to server must contain all the information to…
-
Overview Time complexity is a theoretical measure that describes the amount of computer time it takes to run an algorithm as a function of the length of the input. Instead of measuring actual seconds (which vary by hardware), time complexity counts the number of elementary operations performed. Core Concepts Elementary Operations: Operations that take a…
-
Overview Sorting is the process of arranging a collection of data in a specific order (ascending or descending). Efficient sorting is fundamental to many other algorithms, such as Binary Search. Core Concepts Stability: A sort is stable if it preserves the relative order of records with equal keys. In-Place: An algorithm is in-place if it…
-
Overview Search algorithms are methods used to retrieve information stored within some data structure. The efficiency of a search depends heavily on how the data is organized. Core Concepts Linear Search: Checks every element in sequence. Works on unsorted data. Time: $O(n)$. Binary Search: Repeatedly divides a sorted search interval in half. Works only on…
-
Overview A Greedy Algorithm is an algorithmic paradigm that builds up a solution piece by piece, always choosing the next piece that offers the most obvious and immediate benefit. It makes a locally optimal choice in the hope that this will lead to a globally optimal solution. Core Concepts Greedy Choice Property: A global optimum…
-
Overview Dynamic Programming (DP) is an optimization technique used to solve complex problems by breaking them down into simpler, overlapping subproblems and storing the results of these subproblems to avoid redundant calculations. Core Concepts Optimal Substructure: A problem has optimal substructure if the optimal solution to the problem contains optimal solutions to its subproblems. Overlapping…
