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
#include <stdio.h> | |
#include <time.h> | |
#include <math.h> | |
int timeOne(n) { | |
return n; | |
} | |
void timeN(n) { | |
while(n) { |
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
function forFacto(n) { | |
for(var i=1; n>0; i *= n--); | |
return i; | |
} | |
function recurFacto(n) { | |
if (n === 1) { | |
return 1; | |
} | |
return n * recurFacto(n-1); |
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
function *permutation(arr, size = arr.length) { | |
yield *permutUntil(arr); | |
function *permutUntil(list, picked=[]) { | |
if (list.length === arr.length - size) { | |
// μνλ κΈΈμ΄λ§νΌ λ½νλκΉμ§ λ°λ³΅ | |
return yield picked; | |
} | |
for(let i=0; i<list.length; i++) { | |
let copiedList = list.slice(); // deep copy |
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
const util = require("util") | |
function delay(time, data) { | |
return new Promise((res, rej) => { | |
setTimeout(() => res(data), time); | |
}) | |
} | |
async function *promiseMarathon(...promises) { | |
while (promises.length > 0) { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" /> | |
</head> | |
<body> | |
<h1>Hello World!</h1> | |
<p>Drag the boxes below to somewhere in your OS (Finder/Explorer, Desktop, etc.) to copy an example markdown file.</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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> | |
<body> | |
<h1 id="selectFile"></h1> |
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
console.log('test') |
OlderNewer