├── app
│ ├── services
│ │ ├── admin
│ │ │ ├── posts.js
│ │ │ └── users.js
│ │ ├── posts.js
│ │ ├── session.js
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
| setTimeout(() => { console.log('timeout'); }, 0); | |
| setImmediate(() => { console.log('immediate'); }); | |
| const fs = require('fs'); | |
| fs.readFile(__filename, () => { | |
| setTimeout(() => { | |
| console.log('timeout'); | |
| }, 0); | |
| setImmediate(() => { |
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 <iostream> | |
| /* | |
| it works by swaping the adjacent elements if they are in wrong order | |
| Complexity Analysis of Selection Sort: | |
| Time Complexity: | |
| it always runs O(n^2) time even if the array is sorted. it was optimized by stopping algorithm |
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
| ARG NODE_VERSION | |
| FROM node:${NODE_VERSION} | |
| ENV NODE_ENV=production | |
| WORKDIR /usr/src/app | |
| RUN mkdir -p /usr/src/app/api | |
| RUN mkdir -p /usr/src/app/client |
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 <iostream> | |
| #include <map> | |
| /* | |
| Time complexity: O(Log n) | |
| */ | |
| int searching(const int *array, int length, int value) | |
| { | |
| int startIndex = 0, lastIndex = length - 1; |
Not: it is quoted from google javascript guide document
https://google.github.io/styleguide/jsguide.html
File names must be all lowercase and may include underscores (_) or dashes (-), but no additional punctuation. Follow the convention that your project uses. Filenames’ extension must be .js. example: user-relations.js
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
| interface User { | |
| name: string; | |
| id: number; | |
| } | |
| class UserAccount implements User { | |
| name: string; | |
| id: number; | |
| constructor(name: string, id: number) { |
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 <iostream> | |
| #include <functional> | |
| class Node | |
| { | |
| private: | |
| int data; | |
| Node *next; |
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 <iostream> | |
| #include <stack> | |
| template <class T> | |
| class Node | |
| { | |
| private: | |
| T data; | |
| Node *prev; |