본문 바로가기
728x90

분류 전체보기190

Leethub 연동 에러 및 해결 방법 알고리즘 문제 풀이에 프로그래머스와 LeetCode 를 주로 사용하면서 자동으로 깃허브에 잔디를 심어주는 LeetHub 를 사용해왔다. 얼마전까지 블로그에 올려놓은 글들을 정리하고 최근에 다시 문제를 풀었는데 당연히 잔디가 잘 심어지고 있는 줄 알았다... 문제점을 찾아보니 UI 관련 글들이 많았다... 아래 방법을 사용해 임시방편으로 잔디가 심어지게 했습니다..😂 해결 방법 https://leetcode.com/profile/lab 로 접속해서 Opt-in for further beta testing를 꺼줍니다. 아래 사진에 보이는 Revert to old version 클릭 후 예전 UI 로 돌려서 다시 커밋해줍니다. 추가적인 해결방법을 찾으면 업데이트 하겠습니당... 2023. 12. 22.
[LeetCode] 53. Maximum Subarray Given an integer array nums, find the subarray with the largest sum, and return its sum. Example 1: Input: nums = [-2,1,-3,4,-1,2,1,-5,4] Output: 6 Explanation: The subarray [4,-1,2,1] has the largest sum 6. Example 2: Input: nums = [1] Output: 1 Explanation: The subarray [1] has the largest sum 1. Example 3: Input: nums = [5,4,-1,7,8] Output: 23 Explanation: The subarray [5,4,-1,7,8] has the la.. 2023. 12. 22.
[LeetCode] 52. N-Queens II The n-queens puzzle is the problem of placing n queens on an n x n chessboard such that no two queens attack each other. Given an integer n, return the number of distinct solutions to the n-queens puzzle. Example 1: Input: n = 4 Output: 2 Explanation: There are two distinct solutions to the 4-queens puzzle as shown. Example 2: Input: n = 1 Output: 1 Constraints: 1 { if (i === N) ans++ // 모든 행에 퀸.. 2023. 12. 22.
[LeetCode] 51. N-Queens The n-queens puzzle is the problem of placing n queens on an n x n chessboard such that no two queens attack each other. Given an integer n, return all distinct solutions to the n-queens puzzle. You may return the answer in any order. Each solution contains a distinct board configuration of the n-queens' placement, where 'Q' and '.' both indicate a queen and an empty space, respectively. Example.. 2023. 12. 21.
728x90