Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Method
- Matrix
- Data Structure
- string
- 파이썬
- greedy
- Class
- Number Theory
- Stack
- database
- hash table
- simulation
- bit manipulation
- Binary Search
- 자바
- java
- 코딩테스트
- array
- two pointers
- implement
- Math
- 코테
- Binary Tree
- Counting
- SQL
- dynamic programming
- 구현
- Tree
- sorting
- geometry
Archives
- Today
- Total
코린이의 소소한 공부노트
[LeetCode/Easy] 2119. A Number After a Double Reversal 본문
1. Input
1) 정수 num
2. Output
1) num을 2번 뒤집었을 때 처음과 같으면 true, 다르면 false를 반환
3. Constraint
1) 0 <= num <= 10^6
4. Example
Input: num = 526 -> Output: true
Input: num = 1800 -> Output: false
설명:
- 526 -> 625 -> 526이므로 true를 반환한다.
- 1800 -> 0018=18 -> 81이므로 false를 반환한다.
5. Code
1) 첫 코드(2022/06/16)
if(num == 0)
return true;
if(num%10 == 0)
return false;
return true;
'코딩테스트 풀이 > JAVA' 카테고리의 다른 글
[LeetCode/Easy] 2129. Capitalize the Title (0) | 2023.01.13 |
---|---|
[LeetCode/Easy] 2124. Check if All A's Appears Before All B's (0) | 2023.01.13 |
[LeetCode/Easy] 2114. Maximum Number of Words Found in Sentences (0) | 2023.01.13 |
[LeetCode/Easy] 2108. Find First Palindromic String in the Array (0) | 2023.01.13 |
[LeetCode/Easy] 66. Plus One (0) | 2023.01.12 |