분류 전체보기
-
Github repository의 특정 branch만 clone 하기Error Solving 2023. 6. 19. 18:13
suboptimal.....🙄🙄 git clone -b (branch_name) --single-branch https://github.com/어쩌구/저쩌구.git 원래는 다른 branch가 pull 되어 있어서 branch를 바꿔서 pull & push 할 방법을 찾다가 어차피 이미 pull 되어 있는 branch를 다시 업데이트할 계획이 없기 때문에 아예 지우고 branch를 특정해서 새로 clone 하기로 함
-
VS Code ssh server 터널링 에러Error Solving 2023. 2. 15. 15:10
vscode로 A 서버를 경유해서 B 서버에 들어가려고 했는데 접속이 안 됐다 정상적이라면 A 서버 비밀번호를 입력하고, B 서버 비밀번호를 입력하게끔 창이 떠야 하는데 비밀번호 입력창조차 안 뜨고 프로세스에서 없는 파이프에 쓰려고 했습니다 메세지만 계속 뜸 희한한 게 cmd에서 터널링 하는 것도 되고 vscode에서 외부 연결 가능한 A 서버로 접속하는 것도 되는데 vscode에서 A를 경유해서 B를 들어가는 게 안 되는 거라서 구글에 검색하면 나오는 오류 해결 방법이 뭘 써도 해결이 안 되었다ㅠㅠ config 파일 절대 경로 지정하기, known_hosts 파일 지우기 등등.. ProxyJump만 넣으면 들어가지질 않음 그러다가 찾은 해결 방법 Host server1 HostName 000.000.0..
-
100. Range Sum of BSTProblem Solving 2023. 1. 19. 20:28
https://leetcode.com/problems/range-sum-of-bst/description/ Range Sum of BST - LeetCode Range Sum of BST - Given the root node of a binary search tree and two integers low and high, return the sum of values of all nodes with a value in the inclusive range [low, high]. Example 1: [https://assets.leetcode.com/uploads/2020/11/05/bst1.jpg] Inp leetcode.com Binary Search Tree를 훑으며 범위 내의 수들을 모두 더하는 문제..
-
99. Transpose MatrixProblem Solving 2023. 1. 19. 17:58
https://leetcode.com/problems/transpose-matrix/description/ Transpose Matrix - LeetCode Transpose Matrix - Given a 2D integer array matrix, return the transpose of matrix. The transpose of a matrix is the matrix flipped over its main diagonal, switching the matrix's row and column indices. [https://assets.leetcode.com/uploads/2021/02/10/hint_ leetcode.com matrix를 transpose 하는 문제 class Solution: ..
-
98. 수 뒤집기Problem Solving 2023. 1. 19. 06:21
https://www.acmicpc.net/problem/3062 3062번: 수 뒤집기 수 124를 뒤집으면 421이 되고 이 두 수를 합하면 545가 된다. 124와 같이 원래 수와 뒤집은 수를 합한 수가 좌우 대칭이 되는지 테스트 하는 프로그램을 작성하시오. www.acmicpc.net 입력받은 수를 뒤집어 원래 수와 뒤집은 수의 합이 좌우 대칭인지 확인하는 문제 n = int(input()) for i in range(n): numb = str(input()) revnumb = numb[::-1] sum = int(numb) + int(revnumb) length = len(str(sum)) for j in range(int(length/2)): if str(sum)[j] != str(sum)[l..
-
97. Remove Duplicates from Sorted ArrayProblem Solving 2023. 1. 19. 06:07
https://leetcode.com/problems/remove-duplicates-from-sorted-array/description/ Remove Duplicates from Sorted Array - LeetCode Remove Duplicates from Sorted Array - Given an integer array nums sorted in non-decreasing order, remove the duplicates in-place [https://en.wikipedia.org/wiki/In-place_algorithm] such that each unique element appears only once. The relative order of the e leetcode.com ar..
-
96. Remove ElementProblem Solving 2023. 1. 19. 05:58
https://leetcode.com/problems/remove-element/description/ Remove Element - LeetCode Remove Element - Given an integer array nums and an integer val, remove all occurrences of val in nums in-place [https://en.wikipedia.org/wiki/In-place_algorithm]. The relative order of the elements may be changed. Since it is impossible to change the leng leetcode.com list에서 val과 동일한 값을 지우는 문제 class Solution: de..