This file contains hidden or 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
<label class="control label checkbox"> | |
<input type="checkbox"> | |
<span class="indicator"></span>Checkbox Label | |
</label> | |
label { | |
user-select: none; | |
color: rgb(0, 0, 250); | |
cursor: pointer; |
This file contains hidden or 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
//This is an O(n) algorithm (linear) | |
Given an array A, of size n: | |
1. Pick a random index, p, as the pivot | |
2. Iterate through the array, comparing every element e to p, and counting the total number of elements before p | |
a. if e < p, move e to the left of p | |
b. if e > p, move e to the right of p | |
c. if e == p, leave e where it is | |
3. count the number of elements before p |
This file contains hidden or 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
import java.util.HashMap; | |
class CountUniqueWords { | |
/* | |
* Given a string, return the number of unique (i.e., non-repeated) words in the string, not including punctuation, in O(n). | |
* Hyphenated words such as "case-sensitive" are considered as one word, as are contractions such as "didn't". | |
* NOTE: this function is NOT case-sensitive, so "Ball" and "ball" are not considered unique if both are in the string. | |
*/ | |
public static int countUniqueWords(String s) { |
This file contains hidden or 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
using System.Linq; | |
using System.Windows.Controls; | |
using SharpDX.DXGI; | |
using SharpDX; | |
using SharpDX.WPF; | |
using SharpDX.Direct3D; | |
using SharpDX.Direct3D11; | |
using SharpDX.D3DCompiler; | |
using System.Runtime.InteropServices; |