Skip to content

Commit

Permalink
Merge pull request #2145 from bgoonz/master
Browse files Browse the repository at this point in the history
  • Loading branch information
bgoonz authored May 9, 2022
2 parents 8f16197 + 292a1f2 commit e5e93a2
Show file tree
Hide file tree
Showing 492 changed files with 242,080 additions and 22,772 deletions.
6,235 changes: 45 additions & 6,190 deletions .vscode/PythonImportHelper-v2-Completion.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3713,7 +3713,7 @@ export default class SectionDocs extends React.Component {
{_.get(section, 'subtitle', null) && <p className="block-subtitle"> {htmlToReact(_.get(section, 'subtitle', null))}</p>}
</div>
)}
<div className="block-content">
<div className="<iframe ">
<div
className={classNames('grid', {
'grid-col-2': _.get(section, 'col_number', null) === 'two',
Expand Down Expand Up @@ -3779,7 +3779,7 @@ export default class SectionGrid extends React.Component {
</div>
)}
{_.get(section, 'grid_items', null) && (
<div className="block-content">
<div className="<iframe ">
<div
className={classNames('grid', {
'grid-col-2': _.get(section, 'col_number', null) === 'two',
Expand Down Expand Up @@ -3847,7 +3847,7 @@ export default class SectionHero extends React.Component {
<h1 className="block-title"> {_.get(section, 'title', null)}</h1>
</div>
)}
{_.get(section, 'content', null) && <div className="block-content"> {markdownify(_.get(section, 'content', null))}</div>}
{_.get(section, 'content', null) && <div className="<iframe "> {markdownify(_.get(section, 'content', null))}</div>}
{_.get(section, 'actions', null) && (
<div className="block-buttons">
<CtaButtons {...this.props} actions={_.get(section, 'actions', null)} />
Expand Down
6 changes: 3 additions & 3 deletions blueprint.md
Original file line number Diff line number Diff line change
Expand Up @@ -3707,7 +3707,7 @@ export default class SectionDocs extends React.Component {
{_.get(section, 'subtitle', null) && <p className="block-subtitle"> {htmlToReact(_.get(section, 'subtitle', null))}</p>}
</div>
)}
<div className="block-content">
<div className="<iframe ">
<div
className={classNames('grid', {
'grid-col-2': _.get(section, 'col_number', null) === 'two',
Expand Down Expand Up @@ -3773,7 +3773,7 @@ export default class SectionGrid extends React.Component {
</div>
)}
{_.get(section, 'grid_items', null) && (
<div className="block-content">
<div className="<iframe ">
<div
className={classNames('grid', {
'grid-col-2': _.get(section, 'col_number', null) === 'two',
Expand Down Expand Up @@ -3841,7 +3841,7 @@ export default class SectionHero extends React.Component {
<h1 className="block-title"> {_.get(section, 'title', null)}</h1>
</div>
)}
{_.get(section, 'content', null) && <div className="block-content"> {markdownify(_.get(section, 'content', null))}</div>}
{_.get(section, 'content', null) && <div className="<iframe "> {markdownify(_.get(section, 'content', null))}</div>}
{_.get(section, 'actions', null) && (
<div className="block-buttons">
<CtaButtons {...this.props} actions={_.get(section, 'actions', null)} />
Expand Down
7 changes: 1 addition & 6 deletions mdx.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@

MDX is markdown for the component era. It lets you write JSX embedded inside markdown. It’s a great combination because it allows you to use markdown’s often terse syntax (such as `# heading`) for the little things and JSX for more advanced components.

## [](https://www.gatsbyjs.com/plugins/gatsby-plugin-mdx/#why-mdx)Why




MDX?
## [](https://www.gatsbyjs.com/plugins/gatsby-plugin-mdx/#why-mdx)Why MDX?

Before MDX, some of the benefits of writing Markdown were lost when integrating with JSX. Implementations were often template string-based which required lots of escaping and cumbersome syntax.

Expand Down
910 changes: 451 additions & 459 deletions notes/BGOONZ_BLOG_2.0.wiki/articles/DOM-standard.md

Large diffs are not rendered by default.

114 changes: 57 additions & 57 deletions notes/BGOONZ_BLOG_2.0.wiki/articles/Data-Structures.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Data structures are used in almost all areas of computer science and programmin

Data structures enable us to:

- Manage and utilize large datasets
- Search for particular data from a database
- Design algorithms that are tailored towards particular programs
- Handle multiple requests from users at once
- Simplify and speed up data processing
- Manage and utilize large datasets
- Search for particular data from a database
- Design algorithms that are tailored towards particular programs
- Handle multiple requests from users at once
- Simplify and speed up data processing

Data structures are vital for efficient, real-world problem solving. After all, the way we organize data has a lot of impact on performance and useability. In fact, most top companies require a strong understanding of data structures.

Expand All @@ -28,19 +28,19 @@ The most basic of all data structures, an array stores data in memory for later

Advantages

- Simple to create and use.
- Foundational building block for complex data structures
- Simple to create and use.
- Foundational building block for complex data structures

Disadvantages

- Fixed size
- Expensive to insert/delete or resequence values
- Inefficient to sort
- Fixed size
- Expensive to insert/delete or resequence values
- Inefficient to sort

### Applications

- Basic spreadsheets
- Within complex structures such as hash tables
- Basic spreadsheets
- Within complex structures such as hash tables

## 2\. Queues

Expand All @@ -54,19 +54,19 @@ For a visual, consider a single-lane tunnel: the first car to enter is the first

Advantages

- Dynamic size
- Orders data in the order it was received
- Low runtime
- Dynamic size
- Orders data in the order it was received
- Low runtime

Disadvantages

- Can only retrieve the oldest element
- Can only retrieve the oldest element

### Applications

- Effective as a buffer when receiving frequent data
- Convenient way to store order-sensitive data such as stored voicemails
- Ensures the oldest data is processed first
- Effective as a buffer when receiving frequent data
- Convenient way to store order-sensitive data such as stored voicemails
- Ensures the oldest data is processed first

## 3\. Linked List

Expand All @@ -78,18 +78,18 @@ This system allows efficient insertion and removal of items without the need for

Advantages

- Efficient insertion and removal of new elements
- Less complex than restructuring an array
- Efficient insertion and removal of new elements
- Less complex than restructuring an array

Disadvantages

- Uses more memory than arrays
- Inefficient to retrieve a specific element
- Inefficient to traverse the list backward
- Uses more memory than arrays
- Inefficient to retrieve a specific element
- Inefficient to traverse the list backward

### Applications

- Best used when data must be added and removed in quick succession from unknown locations
- Best used when data must be added and removed in quick succession from unknown locations

## 4\. Trees

Expand All @@ -112,23 +112,23 @@ This type of tree is defined by four strict rules:

Advantages

- Ideal for storing hierarchical relationships
- Dynamic size
- Quick at insert and delete operations
- In a binary search tree, inserted nodes are sequenced immediately.
- Binary search trees are efficient at searches; length is only O(height)O(height).
- Ideal for storing hierarchical relationships
- Dynamic size
- Quick at insert and delete operations
- In a binary search tree, inserted nodes are sequenced immediately.
- Binary search trees are efficient at searches; length is only O(height)O(height).

Disadvantages

- Slow to rearrange nodes
- Child nodes hold no information about their parent node
- Binary search trees are not as fast as the more complicated hash table
- Binary search trees can degenerate into linear search (scanning all elements) if not implemented with balanced subtrees.
- Slow to rearrange nodes
- Child nodes hold no information about their parent node
- Binary search trees are not as fast as the more complicated hash table
- Binary search trees can degenerate into linear search (scanning all elements) if not implemented with balanced subtrees.

### Applications

- Storing hierarchical data such as a file location.
- Binary search trees are excellent for tasks needing searching or ordering of data.
- Storing hierarchical data such as a file location.
- Binary search trees are excellent for tasks needing searching or ordering of data.

> _Enjoying the article? Scroll down to [sign up](https://www.educative.io/blog/blog-newsletter-annoucement) for our free, bi-monthly newsletter._
Expand All @@ -148,18 +148,18 @@ While hard to visualize at first, this structure is invaluable in conveying rela

Advantages

- Can quickly convey visuals over text
- Usable to model a diverse number of subjects so long as they contain a relational structure
- Can quickly convey visuals over text
- Usable to model a diverse number of subjects so long as they contain a relational structure

Disadvantages

- At a higher level, text can be time-consuming to convert to an image.
- It can be difficult to see the existing edges or how many edges a given vertex has connected to it
- At a higher level, text can be time-consuming to convert to an image.
- It can be difficult to see the existing edges or how many edges a given vertex has connected to it

### Applications

- Network representations
- Modeling social networks, such as Facebook.
- Network representations
- Modeling social networks, such as Facebook.

## 6\. Hash Tables (Map)

Expand All @@ -169,20 +169,20 @@ Hash tables are a complex data structure capable of storing large amounts of inf

Advantages

- Key can be in any form, while array's indices must be integers
- Highly efficient search function
- Constant number of operations for each search
- Constant cost for insertion or deletion operations
- Key can be in any form, while array's indices must be integers
- Highly efficient search function
- Constant number of operations for each search
- Constant cost for insertion or deletion operations

Disadvantages

- Collisions: an error caused when two keys convert to the same hash code or two hash codes point to the same value.
- These errors can be common and often require an overhaul of the hash function.
- Collisions: an error caused when two keys convert to the same hash code or two hash codes point to the same value.
- These errors can be common and often require an overhaul of the hash function.

### Applications

- Database storage
- Address lookups by name
- Database storage
- Address lookups by name

Each hash table can be very different, from the types of the keys and values, to the way their hash functions work. Due to these differences and the multi-layered aspects of a hash table, it is nearly impossible to encapsulate so generally.

Expand Down Expand Up @@ -551,8 +551,8 @@ Run

The key is to generate consecutive binary numbers by appending 0 and 1 to previous binary numbers. To clarify,

- 10 and 11 can be generated if 0 and 1 are appended to 1.
- 100 and 101 are generated if 0 and 1 are appended to 10.
- 10 and 11 can be generated if 0 and 1 are appended to 1.
- 100 and 101 are generated if 0 and 1 are appended to 10.

Once we generate a binary number, it is then enqueued to a queue so that new binary numbers can be generated if we append 0 and 1 when that number will be enqueued.

Expand Down Expand Up @@ -708,11 +708,11 @@ Run

We use a loop to iterate through the input list. For a `current` node, its link with the `previous` node is reversed. then, `next` stores the next node in the list. Let's break that down by line.

- Line 22- Store the `current` node's `nextElement` in `next`
- Line 23 - Set `current` node's `nextElement` to `previous`
- Line 24 - Make the `current` node the new `previous` for the next iteration
- Line 25 - Use `next` to go to the next node
- Line 29 - We reset the `head` pointer to point at the last node
- Line 22- Store the `current` node's `nextElement` in `next`
- Line 23 - Set `current` node's `nextElement` to `previous`
- Line 24 - Make the `current` node the new `previous` for the next iteration
- Line 25 - Use `next` to go to the next node
- Line 29 - We reset the `head` pointer to point at the last node

Since the list is traversed only once, the algorithm runs in *O(n)*.

Expand Down
Loading

0 comments on commit e5e93a2

Please sign in to comment.