일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- ML
- API
- Git
- DM
- Linux
- js
- python
- ps
- ts
- review
- CV
- html
- PyTorch
- threejs
- PRISMA
- UI
- figma
- Express
- GAN
- mongo
- postgresql
- C++
- SOLID
- nodejs
- sqlite
- DB
- vscode
- react
- frontend
- CSS
- Today
- Total
목록분류 전체보기 (208)
아카이브
문제You are given an array of non-overlapping intervals intervals where intervals[i] = [start_i, end_i] represent the start and the end of the ith interval and intervals is sorted in ascending order by starti. You are also given an interval newInterval = [start, end] that represents the start and end of another interval. Insert newInterval into intervals such that intervals is still sorted in asce..
문제Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence.You must write an algorithm that runs in O(n) time.예시Example 1:Input: nums = [100,4,200,1,3,2] Output: 4 Explanation: The longest consecutive elements sequence is [1, 2, 3, 4]. Therefore its length is 4. Example 2:Input: nums = [0,3,7,2,5,8,4,6,0,1] Output: 9Example 3:Input: nums = [1,0,1,..
문제There are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1. You are given an array prerequisites where prerequisites[i] = [a_i, b_i] indicates that you must take course b_i first if you want to take course a_i.For example, the pair [0, 1], indicates that to take course 0 you have to first take course 1.Return true if you can finish all courses. Otherwise, return..

Zustand는 프레임워크 독립적인 상태관리 라이브러리중 하나입니다. Store라는 개념을 이용하여 불필요한 props전달을 최소화합니다. 다음과 같이 설치합니다.npm install zustand ※ Zustand는 현재 프레임워크 독립 라이브러리이나, 처음에는 React 전용 라이브러리로 개발되었습니다. 따라서 아래는 React를 기준으로 서술하였습니다.create( )Store를 생성하는 함수입니다. 속성값과 메소드를 포함한 객체를 반환하며, Store 안에서 속성값은 State, 메소드는 Action이라고 표현합니다. 기본적으로 set과 get 두 가지 매개변수를 받습니다. get 함수는 자기 자신 Store 객체를 반환합니다. set 함수는 Store의 값을 설정할 수 있습니다. 만약 인수로 콜..

Prop Drilling일반적으로 애플리케이션을 구성할 때는 다음과 같이 최상단의 App 컴포넌트부터 시작해 하위 컴포넌트를 포함시키는 구조를 사용합니다. 그런데 만약 최상단의 App 컴포넌트와 최하단의 Comp3 컴포넌트가 같은 상태값을 공유하여 사용해야 한다면, Comp1를 통해 해당 값은 props로 전달해주어야 합니다. 이 과정에서 Comp1은 불필요한 props가 늘어나게 됩니다. 하위 컴포넌트인 Comp3과 Comp5가 상태값을 공유하는 경우에도 동일하게 불필요한 props 전달이 이루어집니다. 이렇게 컴포넌트 간 공유해야 하는 상태값이 많아질수록, 자신은 사용하지 않으면서 넘겨주어야 하는 props의 수가 많아지게 됩니다. 이렇게 불필요한 props가 많아지는 현상을 Prop Drilling..

UI 프로토타이핑 과정에서는 특정 상호작용에 따라 수시로 UI의 디자인을 변경해야 할 일이 많습니다. 대표적인 예로 on/off 토글 버튼이나, 수준(여유-혼잡, 쉬움-어려움 등)을 나타내는 라벨 등이 있습니다. 이 경우 같은 frame에 해당 UI만 바꾼 뒤 navigate to로 구현할 수도 있지만, UI가 많아질 수록 생성해야 하는 frame의 수도 굉장히 많아지게 되어 관리가 어렵습니다. Variants는 이렇게 상태값에 따라 달라지는 UI 요소를 관리할 수 있는 Figma의 기능입니다.Variants 생성다음과 같이 ON/OFF 토글로 사용할 요소를 만들고 컴포넌트로 지정합니다. 해당 컴포넌트를 선택해 Main component > Add Variant 를 해줍니다. 혹은 화면 우측 상단 작업창..

문제Given a reference of a node in a connected undirected graph. Return a deep copy (clone) of the graph. Each node in the graph contains a value (int) and a list (List[Node]) of its neighbors.class Node { public int val; public List neighbors;}Test case format: For simplicity, each node's value is the same as the node's index (1-indexed). For example, the first node with val == 1, the secon..
문제You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed. All houses at this place are arranged in a circle. That means the first house is the neighbor of the last one. Meanwhile, adjacent houses have a security system connected, and it will automatically contact the police if two adjacent houses were broken into on the same night. G..