Apes Together Strong.

  • 홈
  • 태그
  • 방명록

2024/07/13 2

[LinkedList][Easy] 206. Reverse Linked List.

https://leetcode.com/problems/reverse-linked-list/description/ 단일 linked list를 뒤집는 문제.마찬가지로 다른 문제들의 초석이 된다. 원리를 알면 간단하므로, 완전히 이해하자. 코드ListNode* reverseList(ListNode* head) { ListNode* node = head; ListNode* prev = nullptr; while (node != nullptr) { ListNode* next = node->next; node->next = prev; prev = node; node = next; } return prev;}  결과

Leetcode/NeetCode 2024.07.13

[BinarySearch][Medium] 33. Search in Rotated Sorted Array

https://leetcode.com/problems/search-in-rotated-sorted-array/description/ 회전된 정렬된 숫자배열이 주어질 때, target 값을 찾고 있다면 그 index를 반환하라. Binary search의 종합 선물세트 문제.  우선 회전된 rotated index를 찾는다.  이후 target 값을 검색하되, 실제 access해야 할 index는 (index+rotateIndex) % arraySize 이다.  코드 더보기int searchMinIdxBS(vector& nums, int left, int right){ if (left > right) return -1; // 1, 2, 3, 4, 5 // // 5, 1, 2, ..

Leetcode/NeetCode 2024.07.13
이전
1
다음
더보기
프로필사진

Apes Together Strong.

  • 분류 전체보기 (422)
    • Lifes in USA (45)
      • LifeLogs (37)
      • Company (7)
      • Cultural Diff (0)
      • Piece of English (1)
      • Daily Journal (0)
    • Think Over (33)
      • Life is... (9)
      • Reviews (24)
    • Work & Programming (32)
      • System Design (21)
      • Game (3)
      • Paintings (3)
      • etc (5)
    • WannaFlySomeDay (22)
      • English (4)
      • Unreal Engine (2)
      • UnityEngine (5)
      • UnityEngine - Shader (11)
    • Leetcode (279)
      • Top Interview 150 (46)
      • LeetCode75 (67)
      • Top 100 Liked (63)
      • Challenges (31)
      • Interview Prep. (3)
      • NeetCode (69)
    • [Scraps-articles] (7)

Tag

duns, 안들려, 재줄근, 멈춰!, 따윈, 원더스페이스, 구경잘함, 항공운항, interpolation, 미국회사, 적응중, 한번 가볼만, ios developer program, 갈만함, 두번 안돼, 법인 등록, 셀프가스라이팅, 보간, 계속적응중, 유니티,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2024/07   »
일 월 화 수 목 금 토
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

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바