반응형

전체 글 66

[리트코드 LeetCode] Sqrt(x) (Python)

Sqrt(x) https://leetcode.com/explore/interview/card/top-interview-questions-medium/113/math/819/ 분류: Top Interview Questions - Medium - Math 문제 음이 아닌 정수 x가 주어졌을 때 x의 제곱근을 계산해라. 결과는 가장 가까운 정수로 내림하여 반환 값도 음이 아닌 정수여야 한다. built-in 연산자나 함수를 사용하지 않고 해결해야 한다. type x: int / rtype: int 예시 Example 1: Input: x = 4 Output: 2 Explanation: The square root of 4 is 2, so we return 2. Example 2: Input: x = 8 Out..

[리트코드 LeetCode] Pow(x, n) (Python)

Pow(x, n) https://leetcode.com/explore/interview/card/top-interview-questions-medium/113/math/818/ 분류: Top Interview Questions - Medium - Math 문제 x의 n승을 계산하는 pow(x, n)을 구현하라. type x: float, type n: int, rtype: float 예시 Example 1: Input: x = 2.00000, n = 10 Output: 1024.00000 Example 2: Input: x = 2.10000, n = 3 Output: 9.26100 Example 3: Input: x = 2.00000, n = -2 Output: 0.25000 Explanation: 2-..

[리트코드 LeetCode] Excel Sheet Column (Python)

Excel Sheet Column https://leetcode.com/explore/interview/card/top-interview-questions-medium/113/math/817/ 분류: Top Interview Questions - Medium - Math Explore - LeetCode LeetCode Explore is the best place for everyone to start practicing and learning on LeetCode. No matter if you are a beginner or a master, there are always new topics waiting for you to explore. leetcode.com 문제 주어진 문자열 columnTi..

[리트코드 LeetCode] Factorial Trailing Zeroes (Python)

Factorial Trailing Zeroes https://leetcode.com/explore/interview/card/top-interview-questions-medium/113/math/816/ 분류: Top Interview Questions - Medium - Math Explore - LeetCode LeetCode Explore is the best place for everyone to start practicing and learning on LeetCode. No matter if you are a beginner or a master, there are always new topics waiting for you to explore. leetcode.com 문제 주어진 정수 n에..

[리트코드 LeetCode] Happy Numebr (Python)

Happy Number https://leetcode.com/explore/interview/card/top-interview-questions-medium/113/math/815 분류: Top Interview Questions - Medium - Math 문제 주어진 숫자 n이 happy한지 판단하는 알고리즘을 작성하라. happy number는 다음의 과정을 통해 결정된다 아무 양의 정수로 시작하여 숫자를 각 자릿수의 제곱의 합으로 바꿈 숫자가 1이 될 때까지 위의 과정을 반복하라 (1이 된다면 연산을 반복해도 계속 1에 머물 것이고, 1이 되지 않는다면 영원히 1이 없는 사이클이 반복될 것임) 1이 되어 끝나는 숫자는 happy하다. type n: int / rtype: bool 예시 Exampl..

[리트코드 (LeetCode)] Kth Largest Element in an Array (Python)

Kth Largest Element in an Array https://leetcode.com/explore/interview/card/top-interview-questions-medium/110/sorting-and-searching/800/ 분류: Top Interview Questions - Medium - Sorting and Searching Explore - LeetCode LeetCode Explore is the best place for everyone to start practicing and learning on LeetCode. No matter if you are a beginner or a master, there are always new topics waiting for y..

[리트코드 (LeetCode)] Merge Two Sorted Lists: Linked List (Python)

Merge Two Sorted List https://leetcode.com/explore/featured/card/top-interview-questions-easy/93/linked-list/771/ 분류: Top Interview Questions - Easy - Linked List Explore - LeetCode LeetCode Explore is the best place for everyone to start practicing and learning on LeetCode. No matter if you are a beginner or a master, there are always new topics waiting for you to explore. leetcode.com 문제 두 개의 ..

[리트코드 (LeetCode)] Missing Number (Python)

Missing Number https://leetcode.com/explore/featured/card/top-interview-questions-easy/99/others/722/ 분류: Top Interview Questions - Easy - Others Explore - LeetCode LeetCode Explore is the best place for everyone to start practicing and learning on LeetCode. No matter if you are a beginner or a master, there are always new topics waiting for you to explore. leetcode.com 문제 주어진 배열 nums는 [0, n] 범위..

[리트코드 (LeetCode)] Valid Parentheses (Python)

Valid Parentheses https://leetcode.com/explore/featured/card/top-interview-questions-easy/99/others/721/ 분류: Top Interview Questions - Easy - Others Explore - LeetCode LeetCode Explore is the best place for everyone to start practicing and learning on LeetCode. No matter if you are a beginner or a master, there are always new topics waiting for you to explore. leetcode.com 문제 주어진 문자열 s는 문자 ‘(’, ..

반응형