목록전체 글
Step-by-Step

https://leetcode.com/problems/convert-sorted-list-to-binary-search-tree/description/ Convert Sorted List to Binary Search Tree - LeetCode Can you solve this real interview question? Convert Sorted List to Binary Search Tree - Given the head of a singly linked list where elements are sorted in ascending order, convert it to a height-balanced binary search tree. Example 1: [https://assets.l leetco..
https://socket.io/ Socket.IO Reliable Rest assured! In case the WebSocket connection is not possible, it will fall back to HTTP long-polling. And if the connection is lost, the client will automatically try to reconnect. socket.io 간단한 정리 : [IT 기술] - HTTP vs WebSocket vs Socket.IO ㅠㅠ 왜 이걸 이제 공부한거지?? 너무 재밌다.. 양방향 통신! Socket.io 설치 npm install socket.io 소켓의 기본 기능 // 데이터 주기 socket.emit("이벤트명", ... );..

Http vs WebSocket HTTP(HyperText Transfer Protocol)은 기본적으로 "Client의 요청 - Server의 응답" 방식으로 이루어져있다. 클라이언트의 요청이 있는 경우에만 서버가 응답으로 리소스를 전송한 후, 연결을 바로 끊는 일방향 통신 기법이다. 또한 서버는 클라이언트의 정보를 저장하지 않는 Stateless 속성을 지녔으며, 쿠키나 세션을 통해 Stateful하도록 만들 수는 있다. 하지만 클라이언트가 정보가 필요한 경우에만 요청하고 응답하는 방식은, 두 클라이언트 사이의 정보를 유지하면서 끊임없이 정보를 주고받는 실시간 및 양방향 통신에는 적합하지 않다. 만약 HTTP로 채팅이나 실시간 통신을 구현하게 된다면, 모든 클라이언트들이 다른 클라이언트로부터 온 메세..

1) Chat 기능 Home Template - Form 설정 (home.PUG) ul form input(type="text", placeholder="write a message", required) button Send 메세지를 보낼 Form & Button 구현 메세지 작성 후 버튼 누르면 BackEnd 로 전송 (App.js) function handleSubmit(event) { // 기본 동작 방지 event.preventDefault(); socket.send(input.value); input.value = ""; // 전송 후 공백으로 변경 } messageForm.addEventListener("submit", handleSubmit); 접속한 Socket 저장 (Server.js) ..

Express로 App 생성 import express from "express"; const app = express(); App 기본 설정 (Server.js) - HTTP 방식 /* HTTP 방식 */ // views에 있는 pug 템플릿 보여줌 app.set("view engine","pug"); app.set("views", __dirname + "/views"); // root 경로로 들어가면 home을 보여줌 (-> ./views/home.pug) app.get("/", (req, res)=> res.render("home")); // public 경로로 들어가면 public 하위 경로의 JS 실행 (static으로 설정해야 보임) app.use("/public", express.static..

https://leetcode.com/problems/count-subarrays-with-fixed-bounds/description/ Count Subarrays With Fixed Bounds - LeetCode Can you solve this real interview question? Count Subarrays With Fixed Bounds - You are given an integer array nums and two integers minK and maxK. A fixed-bound subarray of nums is a subarray that satisfies the following conditions: * The minimum value in leetcode.com Hard 문..

1장 Introduction - 기본적인 개발 설정 Frontend 부분 - public 폴더 Backend 부분 - server.js ※ 사용 기술 에디터 : VSCode 언어 : JavaScript JS 컴파일러 : Babel 서버 : Node.js + Express 통신 프로토콜 : SocketIO 실시간 통신 API : WebRTC
https://nomadcoders.co/noom 줌 클론코딩 – 노마드 코더 Nomad Coders WebSockets, SocketIO, WebRTC nomadcoders.co WebRTC를 배워보고 싶다고 생각해서 찾아보던 도중 좋은 강의를 알게 되었다! 노마드 코더님은 유튜브에서 정말정말정말 많이 봐서, 잘 알고 있다. 어려운 용어도 깔끔하게, 쉽게 알려주셔서 좋았던 기억이 많다. ※ 구현하고 싶은 기능 2가지 1) 실시간 채팅 2) 실시간 동영상 스트리밍
https://expressjs.com/ Express - Node.js web application framework Fast, unopinionated, minimalist web framework for Node.js $ npm install express --save expressjs.com ExpressJS 공식문서 설명 : Fast, unopinionated, minimalist web framework for Node.js Node.js를 위한 빠르고 개방적인 간결한 웹 프레임워크 자체적인 최소한의 기능을 갖춘 라우팅 및 미들웨어 웹 프레임워크 NodeJS 공식문서 설명 : Chrome V8 JavaScript 엔진으로 빌드된 JavaScript 런타임 비동기 이벤트 주도 JavaScript..
https://leetcode.com/problems/string-compression/ String Compression - LeetCode Can you solve this real interview question? String Compression - Given an array of characters chars, compress it using the following algorithm: Begin with an empty string s. For each group of consecutive repeating characters in chars: * If the group's leng leetcode.com 알파벳1 - 연속된 수 (1제외) - 알파벳2 - 연속된 수 - ... 로 나타내는 작..