Java Script is a single thread, not multi-thread. If there is another function in use, other functions should wait in Queue until it's done. Java and C# allow multi-thread. 자바스크립트는 single-thread 이므로 앞선 실행문이 call stack 에서 실행되는 동안 Queue(Java Script event 엔진이 주기적으로 할 일 확인하는 곳)에서 앞선 실행문이 끝나기를 기다린다. Example Code function first(){ setTimeout(function (){ console.log('start timer') }, 1500); // It's su..
What is a module A module is an essential single unit of building a complete program. If your code doesn't have modules, it would be difficult to read and run. How to use module in Node.js? module.exports is used to return an object from the current module when other modules or programs require it. To import module, require keyword is used. Example Code //module.exports returns the result of req..
contains() in HashSet and ArrayList Big-O notation for contains() in HashSet is O(1) which takes constant time and doesn't preserve the order. But, in ArrayList, It takes O(n) which is linear time and ensure the order of the entry. Example Code static int sockMerchant(int n, int[] ar) { Set color = new HashSet(); int pairs = 0; for(int i = 0; i
- Total
- Today
- Yesterday
- 프로그래머스 알고리즘
- 알고리즘
- algorithm
- hackerrank solution
- ... in Javascript
- Collection Framework
- string class in java
- code refactoring
- math.max
- math.abs
- substring()
- easy javascript algorithm
- HashMap
- javascript
- 프로그래머스
- compareTo()
- spring boot application
- easy algorithm
- 프로그래머스 알고리즘문제
- HackerRank Algorithm
- repeat()
- C++
- equals()
- hackerrank javascript solution
- Javascript Algorithm
- java
- hackerrank javascript
- hackerrank
- Object type casting
- rest parameter
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |