OOP consepts
- ## The **core concepts** of OOP are indeed **14** :-
- [[Class]] - Blueprint for creating objects, defining properties and methods.
logseq.order-list-type:: number
- [[Constructor]] - Special method for initializing objects when created.
logseq.order-list-type:: number
- [[Destructors]] - Method for cleaning up when an object is destroyed or goes out of scope.
logseq.order-list-type:: number
- [[Object]] - An instance of a class containing data and behavior.
logseq.order-list-type:: number
- [[Encapsulation]] - Bundling data and methods, restricting direct access to an object's internal state.
logseq.order-list-type:: number
- [[Abstraction]] - Hiding complex implementation details and exposing only essential features.
logseq.order-list-type:: number
- [[Inheritance]] - Mechanism by which one class derives properties and behaviors from another.
logseq.order-list-type:: number
- [[Polymorphism]] - Ability for objects of different types to be treated as instances of a common superclass.
logseq.order-list-type:: number
- [[Composition]] - Creating complex objects by combining simpler objects, a "has-a" relationship.
id:: 67e63024-2a0a-4a19-aff1-05ad33f056cf
logseq.order-list-type:: number
- [[Interface]] - Defines a contract that classes must follow, without providing implementation.
logseq.order-list-type:: number
- [[Method Overloading]] - Defining multiple methods with the same name but different parameters.
logseq.order-list-type:: number
- [[Method Overriding]] - Redefining a method in a subclass to change its behavior.
logseq.order-list-type:: number
- [[Static Methods and Class Methods]] - Methods that belong to the class rather than instances.
logseq.order-list-type:: number
- [[Dynamic Binding (Late Binding)]] - Resolving method calls at runtime based on the object type.
logseq.order-list-type:: number
-
- ## **additional related concepts** or **design patterns** that can supplement or extend OOP are:-
- [[Delegation]] - One object handing over responsibilities to another.
- [[Mixin]] - A class that provides functionality to other classes without being a parent class.
- [[Abstract Classes]] - Classes that cannot be instantiated and may contain abstract methods.
- [[Loose Coupling and High Cohesion]] - Reducing dependencies between components and ensuring focused class responsibilities
- [[Factory Pattern]] - Creating objects without specifying the exact class of object to be created.
- [[Observer Pattern]] - Notifying multiple objects about state changes in another object.
- [[Singleton Pattern]] - Ensuring a class has only one instance and providing a global point of access.
-
-
Algorithms
-
Searching:
-
- Binary Search - efficient algorithm to find an element in a sorted array.
-
- Linear Search - check each element in list one by one until we find the target element.
-
- Depth First Search - explores as far as possible along each branch before backtracking.
-
- Breadth First Search - explores all the neighboring nodes at the present level
-
- Rabin-Karp Algorithm - string searching used to find a pattern within a larger text.
-
- Z Algorithm - string matching algorithm that provides efficient matching
-
-
Sorting:
-
- Insertion Sort - sorting algorithm that builds the final sorted array one item at a time.
-
- Heap Sort - comparison-based sorting algorithm that uses a binary heap data structure
-
- Selection Sort - simple comparison-based sorting algorithm.
-
- Merge Sort - divide-and-conquer sorting algorithm.
-
- Quick Sort - another divide-and-conquer sorting algorithm.
-
- Counting Sort - non-comparison-based sorting algorithm
-
- Bucket Sort - distribution-based sorting algorithm
-
- Bubble Sort - imple comparison-based sorting algorithm
-
- Radix Sort - non-comparative sorting algorithm
-
- Shell Sort - in-place comparison-based sorting algorithm
-
- Comb Sort - variation of Bubble Sort that improves on it by using a gap sequence.
-
- Pigeonhole Sort - comparison-based sorting algorithm
-
- Cycle Sort - non-comparative sorting algorithm
-
-
Graphs:
-
- Kruskal’s Algorithm - algorithm used to find the (MST) of a graph.
-
- Dijkstra’s Algorithm - find the shortest paths from a source vertex-other vertices
-
- Bellman Ford Algorithm - dynamic algorithm used for finding the shortest path
-
- Floyd Warshall Algorithm - finding the shortest paths between all pairs
-
- Topological Sort Algorithm - used to order the vertices of a directed acyclic graph
-
- Flood Fill Algorithm - used to determine the area connected to a given node
-
- Lee Algorithm - BFS based algorithm used to find the shortest path
-
- Prim’s Algorithm - algorithm used to find the MST of a graph
-
- Boruvka’s Algorithm - algorithm used to find theMST of a graph.
-
- Johnson’s Algorithm - find all pairs shortest paths in a weighted directed graph.
-
- Kosaraju’s Algorithm - find the SCC of a directed graph.
-
- Tarjan’s Algorithm - algorithm used to find SCCs in a directed graph.
-
-
Arrays:
-
- Kadane’s Algorithm - used to find the maximum sum subarray
-
- Floyd’s Cycle Detection Algorithm - also known as Tortoise and Hare
-
- Knuth-Morris-Pratt Algorithm (KMP) - used for pattern matching
-
- Quick Select Algorithm - find the k-th smallest element
-
- Boyer-More Majority Vote - used to find the majority element
-
-
Tree:
-
- AA Tree - self-balancing binary search tree
-
- Binary Indexed Tree or Fenwick Tree - efficiently supports dynamic cumulative
-
- Quadtree - used to partition a two-dimensional space
-
- Cartesian Tree - the inorder traversal of the tree gives a sorted sequence
-
- Fibonacci heap - optimize priority queues and supports very efficient
-
- Interval Tree - binary search tree used to store intervals.
-
- Finger Tree - supports efficient access and updates
-
- Crit-bit Trees - storing strings, especially strings of arbitrary length
-
- Scapegoat Tree - self-balancing binary search tree
-
- Splay Tree - the accessed element to the root via splaying
-
- Suffix Tree - efficient string matching, substring search, and various other
-
- Counted B-Trees - efficient range queries
-
- Binary Space Partitioning - recursively dividing a space into two half-spaces
-
- Van Emde Boas Tree - supports efficient priority queue operations.
-
-
Others:
-
- Huffman Coding Compression - lossless data compression algorithm
-
- Euclid’s Algorithm - efficient way to compute the Greatest Common Divisor
-
- Union Find Algorithm - keep track of a collection of disjoint sets
-
- Manacher’s Algorithm - find the longest palindromic substring
-
- Eukerian Path (Hierholzer’s Algorithm) - path that visits every edge exactly once.
-
- Set 1 (Jarvis’s Algorithm or Wrapping) - finding the convex hull
-
- Set 2 (Graham Scan) - finding the convex hull.
-
- Convex Hull using Divide and Conquer Algorithm - enclose a set of points in a plane.
-
- Quickhull Algorithm for Convex Hull - divide and conquer approach for finding convex hull
-
- Distinct elements in subarray using Mo’s Algorithm - square root decomposition
-
- Line Sweep Algorithm - solve geometric problems
-
- MO’s Algorithm (Query square root decomposition) - square root decomposition technique
-
- Disjoint-set Data Structure - used to efficiently manage a collection of disjoint sets.
-
- Ackermann Function - well-known recursive function that grows very quickly.
-
- Zobrist Hashing - hashing technique used in computer games
-
- FM-index - data structure used for efficient full-text searching
-
- Circular buffer - works like a fixed-size queue
-
- Hungarian - Kuhn–Munkres - Munkres Assignment-Algorithm - combinatorial optimization algorithm
-
- Dekker’s Algorithm - first algorithms to solve the mutual exclusion
-
- Winged Edge - used to represent polygonal meshes
-
- Burrows–Wheeler Transform - string transformation algorithm
-
- Zipper - efficiently navigate and manipulate sequences.
-
- Five Balltree Construction Algorithms - efficient nearest neighbor search.
-
- Cuckoo Hashing - hash table algorithm that resolves collisions
-
- Rope (Data Structure) - tree-based data structure used for efficiently concatenating
-
- Binary Decision Diagram - used to represent boolean functions.
-
- Disjoint-set Data Structure - efficiently perform union and find operations
- 28)Bloom Filter - space-efficient probabilistic data structure used to test whether
-
-
-
Short fourmulas
- fibonacci - Short trick
- palindrome - short method
-
Binary systemm
- binary - every type of binary calculations
-
More Learn
- Explore the following links for valuable resources, communities, and tools to enhance your skills:
-
Github & Webs
- Learn Big Company’s Problem Solution
- Awesome Algorithms
- Complate FAANG Preparation
- Code and It’s Pattern Learn
- DSA using Js
- Open-Source Collection of 200+ Algorithmic Flash Cards to Help you Preparing your Algorithm & Data Structure Interview
- 188 Problem Solved in C++ DSA
- DSA Problem Solve
- Domain-Driven Hexagon
- System Design primer can help to understand How system work
- The Patterns of Scalable, Reliable, and Performant Large-Scale Systems
- The Simplest Way to understand patterns
- Design Patterns for Multiple Language
- System Design Preparation
- System Design E-book
- Coding Interview Preparation
- SDE Interview Question