반응형
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
- docker desktop 대체
- webpack
- 트랜잭션 격리
- @Transaction isolation
- TCP/IP
- Spock Stub
- Spock Mock Stub Spy
- docker desktop 유료화 정책
- nuxtjs/composition-api buildModules
- ECMAScript
- 공짜로 Docker Desktop같은거 쓰기
- enum
- @Transaction propagation
- DI
- Spock Spy
- 자바스크립트
- mock stub spy
- 의존성주입
- TypeScript
- HTTP란
- vue store
- Spock Mock
- Vue+Typescript
- 타입스크립트
- Docker Desktop 쓰고싶다
- frontend
- mock stub
- Javascript
- Rancher Desktop설치
- Mock vs Stub
Archives
- Today
- Total
끄적끄적
[알고리즘] Reverse Integer(java) 본문
반응형
class Solution {
public int reverse(int x) {
long res = 0;
while (x != 0) {
res = res * 10 + x % 10;
x = x / 10;
}
if (res < Integer.MIN_VALUE || res > Integer.MAX_VALUE) {
return 0;
} else {
return (int)res;
}
}
}
runtime - 1ms
memory - 36.6mb
반응형
' Computer Science > Algorithm' 카테고리의 다른 글
[알고리즘] Palindrome Number(java) (0) | 2020.04.25 |
---|---|
[알고리즘] Longest Palindromic Substring (java) (0) | 2020.04.25 |
[알고리즘] Two Sum(java, javascript) (0) | 2020.04.25 |
Comments