# Computer Science Knowledge Base ## Programming Fundamentals ### Variables and Data Types - **Variables**: Named storage locations for data - **Primitive Types**: int, float, boolean, char, string - **Reference Types**: Objects, arrays, interfaces - **Type Casting**: Converting between data types ### Control Structures - **Conditional Statements**: if, else if, else, switch - **Loops**: for, while, do-while, foreach - **Break and Continue**: Loop control statements - **Exception Handling**: try-catch blocks for error management ### Functions and Methods - **Function Definition**: Reusable blocks of code - **Parameters**: Input values passed to functions - **Return Values**: Output from function execution - **Recursion**: Functions calling themselves ## Object-Oriented Programming ### Classes and Objects - **Classes**: Blueprints for creating objects - **Objects**: Instances of classes with state and behavior - **Encapsulation**: Bundling data and methods together - **Inheritance**: Creating new classes from existing ones ### Polymorphism and Abstraction - **Method Overloading**: Multiple methods with same name, different parameters - **Method Overriding**: Subclasses providing specific implementations - **Abstract Classes**: Base classes that cannot be instantiated - **Interfaces**: Contracts defining method signatures ## Data Structures ### Linear Data Structures - **Arrays**: Fixed-size collections of elements - **Linked Lists**: Dynamic collections with node references - **Stacks**: LIFO (Last In, First Out) data structure - **Queues**: FIFO (First In, First Out) data structure ### Non-Linear Data Structures - **Trees**: Hierarchical data structures - **Binary Trees**: Trees with maximum two children per node - **Graphs**: Collections of nodes connected by edges - **Hash Tables**: Key-value pairs with fast lookup ## Algorithms ### Sorting Algorithms - **Bubble Sort**: Simple comparison-based sorting - **Quick Sort**: Divide-and-conquer sorting algorithm - **Merge Sort**: Stable, comparison-based sorting - **Heap Sort**: In-place comparison-based sorting ### Search Algorithms - **Linear Search**: Sequential search through elements - **Binary Search**: Efficient search in sorted arrays - **Depth-First Search**: Graph traversal algorithm - **Breadth-First Search**: Level-by-level graph traversal ## Computer Architecture ### Hardware Components - **CPU**: Central Processing Unit for executing instructions - **Memory**: RAM for temporary data storage - **Storage**: Hard drives and SSDs for permanent data - **Input/Output**: Devices for user interaction ### Operating Systems - **Process Management**: Creating and managing processes - **Memory Management**: Allocating and deallocating memory - **File Systems**: Organizing and storing data - **Device Drivers**: Software for hardware communication ## Software Engineering ### Development Lifecycle - **Requirements Analysis**: Understanding user needs - **Design**: Planning system architecture - **Implementation**: Writing actual code - **Testing**: Verifying system functionality - **Deployment**: Releasing software to users ### Version Control - **Git**: Distributed version control system - **Branches**: Separate development lines - **Merging**: Combining changes from different branches - **Pull Requests**: Code review and integration process ## Database Systems ### Relational Databases - **Tables**: Organized collections of related data - **SQL**: Structured Query Language for database operations - **Normalization**: Organizing data to reduce redundancy - **Indexing**: Improving query performance ### NoSQL Databases - **Document Stores**: Storing data in document format - **Key-Value Stores**: Simple data storage systems - **Graph Databases**: Storing relationships between entities - **Column-Family Stores**: Storing data in columns