일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Search Algorithm
- multer-s3
- 알고리즘
- CS
- 문자열처리
- 코드
- AWS
- 파이썬
- Local Search
- 컴퓨터공학
- typescript
- node.js
- computerscience
- node배포
- 배포
- 문자열
- lightsailor
- 컴퓨터과학
- Simulated Annealing
- Hill Climbing
- 철학
- Today
- Total
목록전체 글 (59)
지식의모듈화
98. Validate Binary Search Tree /** * Definition for a binary tree node. * function TreeNode(val, left, right) { * this.val = (val===undefined ? 0 : val) * this.left = (left===undefined ? null : left) * this.right = (right===undefined ? null : right) * } */ /** * @param {TreeNode} root * @return {boolean} */ var isValidBST = function(root) { // console.log(root.left, root.right, root, "VALID"); ..
Problem 77 [Easy] This problem was asked by Snapchat. Given a list of possibly overlapping intervals, return a new list of intervals where all overlapping intervals have been merged. The input list is not necessarily ordered in any way. For example, given [(1, 3), (5, 8), (4, 10), (20, 25)], you should return [(1, 3), (4, 10), (20, 25)]. //Problem 77 [Easy] function answer(arr){ const ans=[]; ar..
var twoSum = function(nums, target) { let obj={} for (let i=0; iNumber(e)) return intarr; } else{ obj[target-e]=index; } } }; TwoSum
import axios from 'axios' let object={}; while(Object.keys(object).length < 3){ try{ let res = await axios.get("https://api.kanye.rest") // console.log(res.data) object[res.data.quote]=(object[res.data.quote]||0)+1; // console.log(res.data.quote) }catch(error){console.log(error)}; } console.log(Object.keys(object)) Axios를 활용하면 쉽게 get을 해올 수 있다. 서로 다른 3개의 kanye west의 명언을 fetch해오는 코드다

Application Layer store and forward: 패킷은 도착이 완료된 후에나 포워딩이 가능함. 한편, 라우터의 큐가 꽉 차면 packet loss가 가능하다. circuit Switching vs Packet switching transmissinon delay(store and forward)+processing delay(table lookup in router)+ queueing delay+ propogation delay(전송의 물리적 시간) 코어보단 end point가 bottleneck TCP UDP 모두 timing, throuput, security를 제공하지 않음. 단, TCP는 flow control, congestion control이 가능함. Server-Cline..
function solution(n, info) { let visited= new Array(info.length).fill(false); let scoreArr= new Array(info.length).fill(0); let answer =0; let answerarr; function dfs( score, current){ let currentDifference=compareScore(info,score) if(answer=0;i--){ if(!visited[i] && current>= info[i]+1){ visited[i]=true; dfs([...score.slice(0,i),info[i]+1,...score.slice(i+1)], current-(info[i]+1)) visited[i]=fa..
function solution(fees, records) { function intervalTime(start,end){ let [hour,min]=start.split(':').map(e=>Number(e)); let [hourE,minE]=end.split(':').map(e=>Number(e)); return hourE*60+minE-(hour*60+min); } records=records.map(e=>e.split(' ')) let parked={}; let Time={}; let cumTime={}; for(let i=0; i
function solution(record) { record =record.map(e=>e.split(' ')); let idToNick={}; for(let i=0; i { if(e[0]!=='Change'){ answer.push(messageMaker(e)) } }) // console.log(answer); return answer; } // update는 모든 곳에 적용해야 한다. // nickname에 중복이 있으니 고유하게 식별할 필요가 있음. Js object활용해서 저장해두면 간편하게 구현할 수 있다.