Apes Together Strong.

  • 홈
  • 태그
  • 방명록

2024/07/26 2

[BackTrack][Medium] 79. Word Search

https://leetcode.com/problems/word-search/description/ m x n grid의 문자열이 주어진다. 이 안에서 특정 word가 존재하는지 여부를 확인하라.  맞는 단어를 하나 하나 확인해 가며 진행한다. 다만 시작 지점이 모든 영역이다. 로직 자체는 간단하다. 코드 더보기bool existBT(int idx, vector& vVisit, vector>& board, string word, int idxW){ int H = board.size(); int W = board[0].size(); char target = word[idxW]; int iy = idx / W; int ix = idx % W; char cur = board[iy..

Leetcode/NeetCode 2024.07.26

[BackTrack][Medium] 40. Combination Sum II

https://leetcode.com/problems/combination-sum-ii/description/ 주어진 정수 배열의 합이 target이 되는 조합을 찾아라. 이때 정수에는 중복값이 있을 수 있다. 결과에서 중복 결과를 제거하라.  Subset II와 거의 같은 풀이의 문제. 같은 로직으로 중복을 제거 할 수 있다.  코드 더보기void combinationSum2BT(int idx, vector>& vRet, vector& vCur, vector& candidates, int target){ if(target idx && candidates[q-1]==candidates[q]) continue; vCur.push_back(candidates[q]); ..

Leetcode/NeetCode 2024.07.26
이전
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.

티스토리툴바