반응형
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 |
Tags
- webpack
- HTTP란
- 의존성주입
- Spock Stub
- @Transaction isolation
- Spock Spy
- 자바스크립트
- nuxtjs/composition-api buildModules
- mock stub
- enum
- TypeScript
- Mock vs Stub
- docker desktop 유료화 정책
- Vue+Typescript
- Javascript
- vue store
- @Transaction propagation
- 트랜잭션 격리
- docker desktop 대체
- Spock Mock
- Spock Mock Stub Spy
- frontend
- Docker Desktop 쓰고싶다
- DI
- Rancher Desktop설치
- ECMAScript
- 공짜로 Docker Desktop같은거 쓰기
- 타입스크립트
- TCP/IP
- mock stub spy
Archives
- Today
- Total
끄적끄적
[알고리즘] Reverse Integer(java) 본문
반응형
![](http://t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png)
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 |