본문 바로가기

IT193

[leetcode] 88. Merge Sorted Array in-place로 작성해야하니 컬렉션을 복재해서 코딩하면 안됨. 변환값이 없기도 하고... Time Complexity: O(m+n)Space Complexity: O(1) The function uses a fixed amount of extra space regardless of the input size. Only a few integer variables are used for index tracking, so the space complexity is  /** Do not return anything, modify nums1 in-place instead. */function merge(nums1: number[], m: number, nums2: number[], n: number): void.. 2024. 6. 30.
[leetcode] 83. Remove Duplicates from Sorted List Time Complexity: O(n) where n is the number of nodes in the linked list.Space Complexity: O(1) as we use constant amount of space for variables. function deleteDuplicates(head: ListNode | null): ListNode | null { let current = head while(current) { if(current.val === current?.next?.val) { current.next = current?.next?.next } else { current = current.ne.. 2024. 6. 29.
[leetcode] Climbing Stairs 아래의 솔루션을 보고 학습했습니다. https://leetcode.com/problems/climbing-stairs/solutions/4211515/0ms-very-easy-beginner-friendly-code-faster-all-three-approaches solution 1Time Complex: O(n)Space Complex: O(n) function climbStairs(n: number): number { if (n  solution 2 (using tabulation)Time Complex: O(n)Space Complex: O(n)function climbStairs(n: number): number { const tab: number[] = new Array(n + 1).f.. 2024. 6. 23.
Toy Project 를 만들기 위한 유용한 사이트 모음 (2024년 6월 업데이트) 무료 이미지https://undraw.co/search Search | unDrawThe design project with open-source illustrations for any idea you can imagine and create. Create beautiful websites, products and applications with your color, for free.undraw.co 서비스 메인 컬러 조합https://2colors.colorion.co/ Two Color CombinationsTwo color combination palettes2colors.colorion.co Firebaseweb hosting, db, deploy, authentication 지원https://f.. 2024. 6. 19.
[css] Animiation 만들 때 유용한 사이트 소개 사이트 소개https://brumm.af/shadows리액트로 만들어진 CSS Shadow Generator, 그래프로 더 정교하게 shadow생성 가능 https://www.grabient.com/ 그라데이션 추천 사이트, 목록이 몇 개 없지만, 커스텀이 가능해서 유용 https://tinytools.design/easing이런 애니메이션 어떻게 만들지? 할 때, 가서 찾고 클립보드 복사하면 끝 https://animista.net/animation을 커스텀할 수 있는 사이트 https://coolors.co/예쁜 색조합들을 추천해주는 사이트 2024. 6. 19.
[html] dns-prefetch 개념리소스 요청 하기 전에 도메인 정보를 분석하는것을 시도한다. 왜 쓰는가?브라우저가 제 3자 서버로부터 리소스를 요청 할때, DNS resolution을 해야한다. (cross-domain의 domain을 ip로 변환).DNS resolution 과정은 엄청난 지연시간을 초래한다. Best Practicesdns-prefetch 는 cross-origin domain에서만 사용해야한다. 같은 도메인을 사용 하면안되. 왜냐면 이미 같은 도메인의 ip는 이미 resolve된 상태preconnect와 같이 쓰면 좋다. dns-prefetch는 DNS lookup만 수행하지만, preconnect는 해당 서버와 커넥션을 만든다. (너무 많은 도메인에 connection을 생성하면, 역효과가 나올 수 있다. 제.. 2024. 6. 19.