Skip to content

GH-135: Big-O in C++ #198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
145 changes: 30 additions & 115 deletions readme/cpp/README.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,15 @@
<!-- BEGIN HEADER -->
<h1 align="center">
<h2 align="center">
Data Structures & Algorithms <br/>
Competitive Programming
</h1>
Competitive Programming <br/>
<i>in C++</i>
</h2>
<!-- END HEADER -->

This repository contains introductions and examples of many popular data structures and algorithms.

Each data structures and algorithm has its own separate article with related explanations and links for further reading (including ones to YouTube videos).

---

<h4 align="center">
Programming Languages: <br/>
<a href="/readme/python">Python</a>,
<a href="/readme/cpp">C++</a>,
<a href="/readme/java">Java</a>,
<a href="/readme/javascript">Javascript</a>,
<a href="/readme/nodejs">NodeJS</a>,
<a href="/readme/typescript">Typescript</a>,
<a href="/readme/csharp">C#</a>,
<a href="/readme/php">PHP</a>,
<a href="/readme/c">C</a>,
<a href="/readme/go">Go</a>,
<a href="/readme/kotlin">Kotlin</a>,
<a href="/readme/rust">Rust</a>,
<a href="/readme/ruby">Ruby</a>
</h4>

---

⭐ [New Version 1.2.0 is released.](https://github.com/rain1024/datastructures-algorithms-competitive-programming/releases)

## ⚛ Introduction

<!-- Section: Introduction -->
<ul>
<li>
Introduction to Data Structures and Algorithms
</li>
<li>
Introduction to Competitive Programming
</li>
<li>
Introduction to Programming Languages
</li>
<li>
<a href="/concepts/abstract/big-o.md">Big-O</a>
<a href="/concepts/cpp/big-o.md"><code>cpp🐀</code></a>
<a href="/concepts/python/big-o.md"><code>py🐍</code></a>
<a href="/concepts/typescript/big-o.md"><code>ts</code></a>
</li>
</ul>

## 📑 Data Structures

A data structure is a data organization, management, and storage format that is usually chosen for efficient access to data. More recisely, a data structure is a collection of data values, the relationships among them, and the functions or operations that can be applied to the data.
Expand All @@ -61,52 +18,40 @@ A data structure is a data organization, management, and storage format that is

<ul>
<li>
<code>B</code> Array
<a href="/concepts/python/array.md"><code>py🐍</code></a>
<a href="/concepts/typescript/array.md"><code>ts</code></a>
<code>B</code>
<a href="/concepts/python/array.md">Array</a>
</li>
<li>
<code>B</code> String
<a href="/concepts/python/string.md"><code>py🐍</code></a>
</li>
<li>
<code>B</code> Linked List
<a href="/concepts/python/linked-list.md"><code>py🐍</code></a>
<a href="/concepts/typescript/linked-list.md"><code>ts</code></a>
</li>
<li>
<code>B</code> Stack
<a href="/concepts/python/stack.md"><code>py🐍</code></a>
<a href="/concepts/typescript/stack.md"><code>ts</code></a>
</li>
<li>
<code>B</code> Queue
<a href="/concepts/cpp/queue.md"><code>cpp🐀</code></a>
<a href="/concepts/python/queue.md"><code>py🐍</code></a>
<a href="/concepts/typescript/queue.md"><code>ts</code></a>
<code>B</code>
<a href="/concepts/cpp/queue.md">Queue</a>
</li>
<li>
<code>B</code> Set
<a href="/concepts/cpp/set.md"><code>cpp🐀</code></a>
<a href="/concepts/python/sets.md"><code>py🐍</code></a>
<a href="/concepts/typescript/set.md"><code>ts</code></a>
<code>B</code>
<a href="/concepts/cpp/set.md">Set</a>
</li>
<li>
<code>B</code> Hash Table
<a href="/concepts/cpp/hash_table.md"><code>cpp🐀</code></a>
<a href="/concepts/python/hash_table.md"><code>py🐍</code></a>
<code>B</code>
<a href="/concepts/cpp/hash_table.md">Hash Table</a>
</li>
<li>
<code>B</code> Heap
</li>
<li>
<code>B</code> Priority Queue
<a href="/concepts/cpp/priority_queue.md"><code>cpp🐀</code></a>
<code>B</code>
<a href="/concepts/cpp/priority_queue.md">Priority Queue</a>
</li>
<li>
<code>A</code> Tree
<a href="/concepts/cpp/tree.md"><code>cpp🐀</code></a>
<a href="/concepts/python/tree.md"><code>py🐍</code></a>
<code>A</code>
<a href="/concepts/cpp/tree.md">Tree</a>
<ul>
<li><code>A</code> Binary Search Tree</li>
<li><code>A</code> AVL Tree</li>
Expand All @@ -119,9 +64,8 @@ A data structure is a data organization, management, and storage format that is
<code>A</code> Graph
</li>
<li>
<code>A</code> Prefix sum (Range queries)
<a href="/concepts/cpp/range_queries.md"><code>cpp🐀</code></a>
<a href="/concepts/python/range_queries.md"><code>py🐍</code></a>
<code>A</code>
<a href="/concepts/cpp/range_queries.md">Prefix sum (Range queries)</a>
</li>
<li>
<code>A</code> Disjoin Set
Expand All @@ -133,8 +77,8 @@ A data structure is a data organization, management, and storage format that is
<code>A</code> LRU Cache
</li>
<li>
<code>A</code> Skiplist
<a href="/concepts/cpp/skip_list.md"><code>cpp🐀</code>
<code>A</code>
<a href="/concepts/cpp/skip_list.md">Skiplist</a>
</li>
</ul>

Expand All @@ -149,12 +93,14 @@ An algorithm is a finite sequence of rigorous instructions, typically used to so
<ul>
<!-- ======== Begin Math ======== -->
<li>
<b><a href="/concepts/cpp/big-o.md">Big-O</a></b>
</li>
<li>
<b>Math</b>
<ul>
<li>
<code>B</code> Bit Manipulation
<a href="/concepts/cpp/bitwise.md"><code>cpp🐀</code></a>
<a href="/concepts/python/bitwise.md"><code>py🐍</code></a>
<code>B</code>
<a href="/concepts/cpp/bitwise.md">Bit Manipulation</a>
</li>
<li>
<code>B</code> Binary Floating Point
Expand Down Expand Up @@ -292,7 +238,6 @@ An algorithm is a finite sequence of rigorous instructions, typically used to so
<!-- ======== Begin Searches ======== -->
<li>
<b>Searches</b>
<a href="/concepts/python/searching.md"><code>py🐍</code></a>
<ul>
<li>
<code>B</code> Linear Search
Expand All @@ -311,9 +256,7 @@ An algorithm is a finite sequence of rigorous instructions, typically used to so
<!-- ======== End Searches ======== -->
<!-- ======== Begin Sorting ======== -->
<li>
<b>Sorting</b>
<a href="/concepts/cpp/sorting.md"><code>cpp🐀</code></a>
<a href="/concepts/python/sorting.md"><code>py🐍</code></a>
<b><a href="/concepts/cpp/sorting.md">Sorting</a></b>
<ul>
<li>
<code>B</code> Bubble Sort
Expand Down Expand Up @@ -529,9 +472,7 @@ An algorithm is a finite sequence of rigorous instructions, typically used to so
<ul>
<!-- ======== Begin Brute Force ======== -->
<li>
<b>Brute Force</b> - look at all the possibilities and selects the best solution
<a href="/concepts/cpp/brute_force.md"><code>cpp🐀</code></a>
<a href="/concepts/python/brute_force.md"><code>py🐍</code></a>
<b><a href="/concepts/cpp/brute_force.md">Brute Force</a></b> - look at all the possibilities and selects the best solution
<ul>
<li>
<code>B</code> Linear Search
Expand All @@ -556,8 +497,7 @@ An algorithm is a finite sequence of rigorous instructions, typically used to so
<!-- ======== End Brute Force ======== -->
<!-- ======== Begin Greedy ======== -->
<li>
<b>Greedy</b> - make the locally optimal choice at each stage with the hope of finding a global optimum
<a href="/concepts/python/greedy.md"><code>py🐍</code></a>
<b><a href="/concepts/python/greedy.md">Greedy</a></b> - make the locally optimal choice at each stage with the hope of finding a global optimum
<ul>
<li>
<code>B</code> Jump Game
Expand Down Expand Up @@ -631,8 +571,7 @@ An algorithm is a finite sequence of rigorous instructions, typically used to so
<!-- ======== End Divide and Conquer ======== -->
<!-- ======== Begin Dynamic Programming ======== -->
<li>
<b>Dynamic Programming</b> - break the problem into subproblems and store the results of subproblems to avoid computing the same results again
(basic: <a href="/concepts/cpp/dp_basic.md"><code>cpp🐀</code></a>, intermidate: <a href="/concepts/cpp/dp_intermediate.md"><code>cpp🐀</code></a>)
<b><a href="/concepts/cpp/dp_basic.md">Dynamic Programming</a></b> - break the problem into subproblems and store the results of subproblems to avoid computing the same results again
<ul>
<li>
<code>B</code> Fibonacci Number
Expand Down Expand Up @@ -721,28 +660,4 @@ An algorithm is a finite sequence of rigorous instructions, typically used to so
<b>Branch & Bound</b> remember the lowest-cost solution found at each stage of the backtracking search, and use the cost of the lowest-cost solution found so far as a lower bound on the cost of a least-cost solution to the problem, in order to discard partial solutions with costs larger than the lowest-cost solution found so far. Normally BFS traversal in combination with DFS traversal of state-space tree is being used.
</li>
<!-- ======== End Branch & Bound ======== -->
</ul>

## 🔆 Collections

**Competitive Programming Events**

* 🎄 Advent of Code ([2022](collections/advent-of-code-2022/))
* 🔰 Google Code Jam ([2022](collections/codejam-2022/))

**Coding Problems Website**

* [🔸 LeetCode](collections/leetcode/)

**Courses & Specialization**

* [🍨 Data Structures and Algorithms Specialization](collections/datastructures-and-algorithms-specialization/), University of California San Diego

## Contributors

This project exists thanks to all the people who contributed.

<a href="https://github.com/rain1024/datastructures-algorithms-competitive-programming/graphs/contributors">
<img src="https://contrib.rocks/image?repo=rain1024/datastructures-algorithms-competitive-programming" />
</a>

</ul>
1 change: 0 additions & 1 deletion readme/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Data Structures & Algorithms <br/>
Competitive Programming <br/>
<i>in Python</i>
</h2>

<!-- END HEADER -->

This repository contains introductions and examples of many popular data structures and algorithms.
Expand Down