This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Heading 1</h1> | |
<h2>Heading 2</h2> | |
<h3>Heading 3</h3> | |
<h4>Heading 4</h4> | |
<h5>Heading 5</h5> | |
<h6>Heading 6</h6> | |
<hr /> | |
<br> | |
<br> | |
<button>Button</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Materialize CSS with fallback --> | |
<script> | |
function fallbackMaterialize() { | |
var mLink = document.createElement('LINK'); | |
mLink.setAttribute('rel', 'stylesheet'); | |
mLink.setAttribute('href', 'assets/css/materialize.css'); | |
document.querySelector('head').appendChild(mLink); | |
} | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Outputs a modified comment markup. | |
* | |
* | |
* @see wp_list_comments() | |
* | |
* @param WP_Comment $comment Comment to display. | |
* @param int $depth Depth of the current comment. | |
* @param array $args An array of arguments. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## O(1) Constant | |
```py | |
FindMin(x, y) { | |
if (x < y) { | |
return x | |
} | |
else { | |
return y | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BinarySearch(numbers, low, high, key) { | |
if (low > high) | |
return -1 | |
mid = (low + high) / 2 | |
if (numbers[mid] < key) { | |
return BinarySearch(numbers, mid + 1, high, key) | |
} | |
else if (numbers[mid] > key) { | |
return BinarySearch(numbers, low, mid - 1, key) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Partition(numbers, lowIndex, highIndex) { | |
// Pick middle element as pivot | |
midpoint = lowIndex + (highIndex - lowIndex) / 2 | |
pivot = numbers[midpoint] | |
done = false | |
while (!done) { | |
// Increment lowIndex while numbers[lowIndex] < pivot | |
while (numbers[lowIndex] < pivot) { | |
lowIndex += 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SelectionSort(numbers, numbersSize) { | |
i = 0 | |
j = 0 | |
indexSmallest = 0 | |
temp = 0 // Temporary variable for swap | |
for (i = 0; i < numbersSize - 1; ++i) { | |
// Find index of smallest remaining element | |
indexSmallest = i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
InsertionSort(numbers, numbersSize) { | |
i = 0 | |
j = 0 | |
temp = 0 // Temporary variable for swap | |
for (i = 1; i < numbersSize; ++i) { | |
j = i | |
// Insert numbers[i] into sorted part | |
// stopping once numbers[i] in correct position | |
while (j > 0 && numbers[j] < numbers[j - 1]) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
InsertionSortInterleaved(numbers, numbersSize, startIndex, gap) { | |
i = 0 | |
j = 0 | |
temp = 0 // Temporary variable for swap | |
for (i = startIndex + gap; i < numbersSize; i = i + gap) { | |
j = i | |
while (j - gap >= startIndex && numbers[j] < numbers[j - gap]) { | |
temp = numbers[j] | |
numbers[j] = numbers[j - gap] |