본문 바로가기 메뉴 바로가기

Go, Vantage point

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • RSS

Go, Vantage point

검색하기 폼
  • 분류 전체보기 (457)
    • Cloud (56)
      • AWS (48)
      • GCP (5)
      • Terraform (2)
      • 네이버 클라우드 (1)
    • CS (88)
      • OS (7)
      • 네트워크 & Ubuntu (30)
      • Docker (12)
      • Kubernetes (10)
      • Elastic Search (4)
      • GNN (8)
      • 하드웨어 (3)
      • 기타 (14)
    • 프로그래밍 (0)
      • Spring (18)
      • Spring DataBase (19)
      • C++ (3)
      • Unity (6)
      • Java (1)
    • 알고리즘 공부 (255)
      • 알고리즘 문제 분류 (16)
      • 백준 (134)
      • LeetCode (59)
      • 알고스팟 (36)
      • 알고리즘 기법 (9)
      • 기타 사이트 (1)
    • 독서 (8)
      • 프로그래밍 서적 (8)
    • SW 활동 (2)
  • 방명록

릿코드 Container With Most Water (1)

프로필사진

Go, Vantage point

가까운 곳을 걷지 않고 서는 먼 곳을 갈 수 없다.


Github | https://github.com/overnew/

Blog | https://everenew.tistory.com/





[LeetCode] 11. Container With Most Water (C++)

문제 https://leetcode.com/problems/container-with-most-water/ Container With Most Water - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 풀이 난이도: Medium 훨씬 간단한 스위핑 풀이가 있지만 정렬을 이용한 본인의 풀이부터 소개하겠다. 정렬을 이용한 풀이 O(n log(n)) pair 자료구조를 이용하여 firt에는 높이, second에는 위치 값을 저장한 다음 높이를 내림차순으로 정렬해주자..

알고리즘 공부/LeetCode 2021. 10. 15. 17:19
이전 1 다음
이전 다음
반응형
인기글
Total
Today
Yesterday
«   2025/06   »
일 월 화 수 목 금 토
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
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바