{"id":21836726,"url":"https://github.com/tonystark-19/cpp-coding","last_synced_at":"2025-10-08T07:30:39.942Z","repository":{"id":263142693,"uuid":"889358952","full_name":"TonyStark-19/Cpp-coding","owner":"TonyStark-19","description":"This repo contains c++ program made by me : )","archived":false,"fork":false,"pushed_at":"2025-01-19T16:17:07.000Z","size":1182,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-19T17:27:45.182Z","etag":null,"topics":["cpp","cppprogramming"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TonyStark-19.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-16T06:56:11.000Z","updated_at":"2025-01-19T16:17:09.000Z","dependencies_parsed_at":"2024-12-03T18:21:40.794Z","dependency_job_id":"ed8a47cc-6577-4054-a259-eca56075101d","html_url":"https://github.com/TonyStark-19/Cpp-coding","commit_stats":null,"previous_names":["tonystark-19/cpp-coding"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TonyStark-19%2FCpp-coding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TonyStark-19%2FCpp-coding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TonyStark-19%2FCpp-coding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TonyStark-19%2FCpp-coding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TonyStark-19","download_url":"https://codeload.github.com/TonyStark-19/Cpp-coding/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235688664,"owners_count":19029915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","cppprogramming"],"created_at":"2024-11-27T20:41:51.586Z","updated_at":"2025-10-08T07:30:39.933Z","avatar_url":"https://github.com/TonyStark-19.png","language":"C++","readme":"# 🚀 C++ OOP and DSA Programs Repository  \n\nThis repository contains a collection of **C++ programs** covering **Object-Oriented Programming (OOP)** concepts and **Data Structures \u0026 Algorithms (DSA)**. Each program demonstrates specific principles, helping you build a strong foundation in **C++ programming**. It’s designed to help you master C++ through hands-on coding.\n\n---\n\n## 📂 Repository Structure  \n\nThis repository is organized into multiple folders, each containing various programs related to **OOP** and **DSA**.  \n\n### 🏗 Object-Oriented Programming (OOP) Concepts  \n\n#### 🔹 [Class-Programs](./Class-Programs/)  \nPrograms demonstrating **class structure, object creation, templates and much more**.  \n\n- [ ] **Class program** - simple class program  \n- [ ] **Destructor** - destructor program  \n- [ ] **Parametrized constructor** - a type of constructor\n- [ ] **Shallow vs Deep copy** - to understand how shallow and deep copy works\n- [ ] **Static data member** - to understand usage of static data member\n- [ ] **Student marksheet** - student marksheet program using class\n- [ ] **Templates** - to understand usage of templates in c++\n\n#### 🔹 [Functions](./Functions/)  \nPrograms related to **Static member, friend, and inline functions**.  \n\n- [ ] **Friend function** - to understand usage of friend function\n- [ ] **Inline function** - to understand usage of inline function  \n- [ ] **Static member function** - to understand usage of static memeber function\n\n#### 🔹 [Inheritance](./Inheritence/)  \nCovers **single, multilevel, multiple, hierarchical and hybrid inheritance**.  \n\n- [ ] **Hierarchical inheritance** - to understand hierarchical inheritance  \n- [ ] **Hybrid Inheritance** - to understand hybrid Inheritance\n- [ ] **Multilevel inheritance** - to understand multilevel inheritance\n- [ ] **Multilevel inheritance 2** - another program using multilevel inheritance\n- [ ] **Multiple inheritance** - to understand multiple inheritance\n- [ ] **Single inheritance** - to understand single inheritance\n\n#### 🔹 [Polymorphism](./Polymorphism/)  \nExamples of **function overloading, operator overloading, and runtime polymorphism**.  \n\n- [ ] **Function overriding** - to understand the concept of function overriding\n- [ ] **Operator overloading** - Binary Minus (-) Operator\n- [ ] **Operator overloading** - Binary Plus (+) Operator    \n- [ ] **Operator overloading** - Equality (==) Operator\n- [ ] **Operator overloading** - Increment (++) Operator\n- [ ] **Runtime polymorphism** - to understand usage of virtual functions\n\n---\n\n### 📊 Data Structures \u0026 Algorithms (DSA)  \n\n#### 🔹 [Array Data Structure](./Array%20data%20structure/)  \nImplementation of arrays and **solutions to various LeetCode problems with different approaches**.  \n\n- [ ] **2Sum** - leetcode 1\n- [ ] **3Sum** - leetcode 15 (using hashing)\n- [ ] **3Sum 2** - leetcode 15 (using two pointer approach)\n- [ ] **4Sum** - leetcode 18\n- [ ] **Aggresive cows** - using binary search approach\n- [ ] **Binary search** - using iterative method\n- [ ] **Binary search 2** - using recursive method\n- [ ] **Binary search 3** - leetcode 33\n- [ ] **Book allocation** - using binary search approach\n- [ ] **Bubble sort** - bubble sort algorithm\n- [ ] **Buy and sell** - leetcode 121\n- [ ] **Container with most water** - leetcode 21 (brute force)\n- [ ] **Container with most water 2** - leetcode 21 (using two pointer approach)\n- [ ] **Diagonal sum in matrix** - leetcode 1572\n- [ ] **Find duplicate** - leetcode 287\n- [ ] **Find missing and repeating value** - leetcode 2965\n- [ ] **Insertion sort** - insertion sort algorithm\n- [ ] **Linear search** - linear search algorithm\n- [ ] **Linear search in matrix** - linear search in matrix\n- [ ] **Majority element** - leetcode 169 (brute force)\n- [ ] **Majority element 2** - leetcode 169 (moore's voting algorithm)\n- [ ] **Maximum row and column sum** - Maximum row and column sum problem\n- [ ] **Maximum subarray sum** - leetcode 53 (brute force)\n- [ ] **Maximum subarray sum 2** - leetcode 53 (Kadane's algorithm)\n- [ ] **Merge sorted arrays** - leetcode 88\n- [ ] **Next permutation** - leetcode 31\n- [ ] **Painter's partition** - using binary search approach\n- [ ] **Pair sum** - binary search approach\n- [ ] **Pair sum 2** - two pointer approach\n- [ ] **Peak index** - leetcode 852 (brute force)\n- [ ] **Peak index 2** - leetcode 852 (optimized)\n- [ ] **Power function** - leetcode 50\n- [ ] **Product of array** - leetcode 238 (brute force)\n- [ ] **Product of array 2** - leetcode 238 (optimized)\n- [ ] **Reverse array** - to reverse an array\n- [ ] **Search in 2d matrix** - leetcode 74\n- [ ] **Search in 2d matrix II** - leetcode 240\n- [ ] **Selection sort** - selection sort algorithm\n- [ ] **Single element** - leetcode 540 (brute force)\n- [ ] **Single element 2** - leetcode 540 (binary search)\n- [ ] **Small and large in array** - Small and large element in array\n- [ ] **Sort colors** - leetcode 75 (optimized)\n- [ ] **Sort colors** - leetcode 75 (Dutch national flag algortihm)\n- [ ] **Spiral matrix** - leetcode 54\n- [ ] **Subarray sum equal k** - leetcode 560\n- [ ] **Sum product in array** - sum and product of an array\n- [ ] **Swap max min in array** - to swap max and min elements of an array\n\n#### 🔹 [Linked-List](./Linked-list/)\nImplementation of Linked list and **solutions to various LeetCode problems with different approaches**.  \n\n- [ ] **Circular Linked-list** - program for circular linked list implementation\n- [ ] **Copy list with random pointers** - leetcode 138\n- [ ] **Doubly Linked-list** - program for doubly linked list implementation\n- [ ] **Flatten a Multilevel Doubly Linked List** - leetcode 430\n- [ ] **Linked-list intro** - program for linked list implementation\n- [ ] **Linked-list cycle** - leetcode 141\n- [ ] **Linked-list cycle II** - leetcode 142\n- [ ] **LRU Cache** - leetcode 146\n- [ ] **Merge two sorted lists** - leetcode 21\n- [ ] **Middle of Linked-list** - leetcode 876\n- [ ] **Reverse Linked-list** - leetcode 206\n- [ ] **Reverse nodes in k group** - leetcode 25\n- [ ] **Swap Nodes in Pairs** - leetcode 24\n\n#### 🔹 [Stack](./Stack/)\nImplementation of Stack and **solutions to various LeetCode problems with different approaches**.  \n\n- [ ] **Celebrity Problem** - the celebrity problem\n- [ ] **Design Min Stack** - leetcode 155\n- [ ] **Design Min Stack 2** - leetcode 155 (more optimal)\n- [ ] **Largest Rectangle in Histogram** - leetcode 84\n- [ ] **Next greater element** - next greater element problem\n- [ ] **Next greater element I** - leetcode 496\n- [ ] **Next greater element II** - leetcode 503\n- [ ] **Previous Smaller Element** - previous smaller element problem\n- [ ] **Stack using Linked-list** - stack implementation using linked-list\n- [ ] **Stack using STL** - stack implementation using STL library\n- [ ] **Stack using vectors** - stack implementation using vectors\n- [ ] **Stock span** - stock span problem\n- [ ] **Trapping Rain Water** - leetcode 42 (using prefix array)\n- [ ] **Trapping Rain Water 2** - leetcode 42 (using two pointer approach)\n- [ ] **Valid Parentheses** - leetcode 20\n\n#### 🔹 [Queue](./Queue/)\nImplementation of Queue and **solutions to various LeetCode problems with different approaches**.\n\n- [ ] **Circular queue** - circular queue implementation using array\n- [ ] **Deque** - Double ended queue implementation using STL\n- [ ] **Gas station** - leetcode 134\n- [ ] **Queue intro** - queue implementation using linked-list\n- [ ] **Queue intro 2** - queue implementation using STL\n- [ ] **Queue using stack** - leetcode 232\n- [ ] **Sliding Window Maximum** - leetcode 239\n- [ ] **Stack using queue** - leetcode 225\n- [ ] **Unique char** - leetcode 387\n\n#### 🔹 [Tree](./Tree/)\nImplementation of Tree and **solutions to various LeetCode problems with different approaches**.\n\n- [ ] **Binary search tree** - implement binary search tree\n- [ ] **Binary tree** - building binary tree and implementing different tree traversals.\n- [ ] **Binary tree path** - leetcode 257\n- [ ] **Bottom view of binary tree** - to find the tree nodes which are visible from bottom\n- [ ] **BST from preorder sequence** - leetcode 1008\n- [ ] **BST Iterator** - leetcode 173\n- [ ] **Build tree** - leetcode 105\n- [ ] **Count nodes** - to count number of nodes in a tree\n- [ ] **Delete node in BST** - delete node in binary search tree\n- [ ] **Diameter of Binary Tree** - leetcode 543\n- [ ] **Diameter of Binary Tree 2** - leetcode 543 (more optimal)\n- [ ] **Flatten binary tree to linkedlist** - leetcode 114\n- [ ] **Height of tree** - to calculate height of tree\n- [ ] **Identical tree** - leetcode 100\n- [ ] **InorderPreAndSucc** - Inorder Predecessor \u0026 Successor in BST\n- [ ] **Kth level of tree** - to print nodes of kth level of tree\n- [ ] **kth smallest in BST** - leetcode 230\n- [ ] **Largest BST in binary tree** - to find largest BST in binary tree\n- [ ] **Lowest common ancestor in binary tree** - leetcode 236\n- [ ] **Lowest common ancestor in BST** - leetcode 235\n- [ ] **Maximum width of binary tree** - leetcode 662\n- [ ] **Merge two BST** - merge two binary search tree\n- [ ] **Minimun distance between BST nodes** - leetcode 783\n- [ ] **Morris inorder traversal** - leetcode 94\n- [ ] **Populate next right pointers** - leetcode 116\n- [ ] **Recover BST** - leetcode 99\n- [ ] **Search in BST** - search in binary search tree\n- [ ] **Sorted array to balanced BST** - leetcode 108\n- [ ] **Subtree or not** - leetcode 572\n- [ ] **Sum of nodes** - to calulate sum of nodes value of tree\n- [ ] **Top view of binary tree** - to find the tree nodes which are visible from top\n- [ ] **Transform to sum tree** - transform binary tree to sum tree\n- [ ] **Validate binary search tree** - leetcode 98\n\n#### 🔹 [Recursion](./Recursion/)  \nPrograms demonstrating **recursive problem-solving techniques**.  \n\n- [ ] **Binary search** - leetcode 704\n- [ ] **Combination Sum** - leetcode 39\n- [ ] **Count inversion** - using merge sort algorithm\n- [ ] **Factorial** - factorial using recursion\n- [ ] **Fibonacci** - leetcode 509   \n- [ ] **Is array sorted** - is array sorted or not using recursion\n- [ ] **Knights tour** - leetcode 2596\n- [ ] **Merge sort algorithm** - merge sort algorithm implementation using recursion\n- [ ] **N queens** - leetcode 51\n- [ ] **N sum** - sum of n values using recursion\n- [ ] **Palindrome partitioning** - leetcode 131\n- [ ] **Permutations in array** - leetcode 46   \n- [ ] **Quick sort algorithm** - quick sort algorithm implementation\n- [ ] **Rat in a maze** - rat in a maze problem using recursion\n- [ ] **Subsets** - leetcode 78\n- [ ] **Subsets II** - leetcode 90\n- [ ] **Sudoku solver** - leetcode 37\n\n#### 🔹 [Patterns](./Patterns/)  \nA collection of **pattern-printing programs using loops**.  \n\n- [ ] **Butterfly pattern**  \n- [ ] **Floyd triangle pattern**\n- [ ] **Hollow diamond pattern**  \n- [ ] **Inverted triangle pattern**  \n- [ ] **Pyramid pattern**\n- [ ] **Reverse triangle pattern**\n- [ ] **Square pattern**\n- [ ] **Square pattern 2**\n- [ ] **Triangle pattern**\n- [ ] **Triangle pattern 2**\n\n---\n\n### 📁 Additional Sections  \n\n#### 🔹 [Cpp Programs](./Cpp%20programs/)  \nGeneral **C++ programs** that don't fit into the above categories.  \n\n- [ ] **Count primes** - to count all prime numbers in a range  \n- [ ] **GCD** - gcd program using Euclid's Algorithm  \n- [ ] **Palindrome number** - leetcode 9\n- [ ] **Permutation in a string** - leetcode 567\n- [ ] **Read and Write in a file** - to read and write in file using file handling\n- [ ] **Remove all occurrences** - leetcode 1910\n- [ ] **Reverse integer** - leetcode 7\n- [ ] **Reverse string** - leetcode 344\n- [ ] **Reverse string 2** - to reverse a string directly using reverse function\n- [ ] **Reverse words in a string** - leetcode 151\n- [ ] **String compression** - leetcode 443\n- [ ] **Valid palindrome** - leetcode 125\n\n---\n\n## 🔧 Prerequisites\n\nTo run the programs in this repository, you need:\n\n- A C++ compiler (e.g., GCC, MinGW, or Visual Studio).\n- Basic knowledge of C++ programming, OOP principles, and DSA techniques.\n\n---\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonystark-19%2Fcpp-coding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftonystark-19%2Fcpp-coding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonystark-19%2Fcpp-coding/lists"}