일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 릿코드
- 릿코드 풀기
- LeetCode
- leetcode풀이
- 상가수익률계산기
- python 알고리즘
- python xor
- leetcode 풀기
- 릿코드풀기
- python 릿코드
- 파이썬릿코드풀기
- leetcode풀기
- 파이썬 알고리즘 풀기
- python priority queue
- python zip_longest
- 파이썬 프로그래머스
- 파이썬알고리즘
- 파이썬 릿코드
- python Leetcode
- 파이썬 알고리즘
- python sorted
- 알고리즘풀기
- 파이썬릿코드
- 파이썬알고리즘풀기
- 코틀린기초
- binary search
- 릿코드 파이썬
- 릿코드풀이
- 잇츠디모
- 알고리즘풀이
- Today
- Total
목록알고리즘 (194)
소프트웨어에 대한 모든 것
문제) 2396. Strictly Palindromic Number An integer n is strictly palindromic if, for every base b between 2 and n - 2 (inclusive), the string representation of the integer n in base b is palindromic. Given an integer n, return true if n is strictly palindromic and false otherwise. A string is palindromic if it reads the same forward and backward. Example 1: Input: n = 9 Output: false Explanation: ..
문제) 1476. Subrectangle Queries Implement the class SubrectangleQueries which receives a rows x cols rectangle as a matrix of integers in the constructor and supports two methods: 1. updateSubrectangle(int row1, int col1, int row2, int col2, int newValue) Updates all values with newValue in the subrectangle whose upper left coordinate is (row1,col1) and bottom right coordinate is (row2,col2). 2. ..
문제) 2465. Number of Distinct Averages You are given a 0-indexed integer array nums of even length. As long as nums is not empty, you must repetitively: Find the minimum number in nums and remove it. Find the maximum number in nums and remove it. Calculate the average of the two removed numbers. The average of two numbers a and b is (a + b) / 2. For example, the average of 2 and 3 is (2 + 3) / 2 ..
문제) 504. Base 7 Given an integer num, return a string of its base 7 representation. Example 1: Input: num = 100 Output: "202" Example 2: Input: num = -7 Output: "-10" Constraints: -107 = 0 else False num = abs(num) while num: num, remainder = divmod(num, 7) base_seven.append(str(remainder)) # 결과 변환 base_seven.reverse() ret = ''.join(base_seven) if not positive: ret = '-' + ret return ret 솔루션2) -..
문제) 173. Binary Search Tree Iterator Implement the BSTIterator class that represents an iterator over the in-order traversal of a binary search tree (BST): BSTIterator(TreeNode root) Initializes an object of the BSTIterator class. The root of the BST is given as part of the constructor. The pointer should be initialized to a non-existent number smaller than any element in the BST. boolean hasNex..
문제) 496. Next Greater Element I The next greater element of some element x in an array is the first greater element that is to the right of x in the same array. You are given two distinct 0-indexed integer arrays nums1 and nums2, where nums1 is a subset of nums2. For each 0
문제) 2043. Simple Bank System You have been tasked with writing a program for a popular bank that will automate all its incoming transactions (transfer, deposit, and withdraw). The bank has n accounts numbered from 1 to n. The initial balance of each account is stored in a 0-indexed integer array balance, with the (i + 1)th account having an initial balance of balance[i]. Execute all the valid tr..
문제) 151. Reverse Words in a String Given an input string s, reverse the order of the words. A word is defined as a sequence of non-space characters. The words in s will be separated by at least one space. Return a string of the words in reverse order concatenated by a single space. Note that s may contain leading or trailing spaces or multiple spaces between two words. The returned string should..