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
- two pointers
- 자바
- hash table
- Class
- string
- database
- Tree
- dynamic programming
- Data Structure
- array
- 코테
- simulation
- Method
- java
- geometry
- sorting
- SQL
- Binary Tree
- Binary Search
- Math
- 구현
- Counting
- greedy
- Matrix
- Stack
- 파이썬
- 코딩테스트
- implement
- bit manipulation
- Number Theory
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 |