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
- printer_helper
- organizeImports
- GlobalInterprintLock
- 글쓰기가필요하지않은인생은없다
- python
- flake8
- codewar
- opensouce
- springboot
- restfulapi
- maxlinelength
- conf
- 유닉스의탄생
- 규칙없음
- ProxyServer
- goalng
- Golang
- 코로나백신
- pep8
- Lint
- pyenv
- typevar
- loadimpact
- 조엘온소프트웨어
- Algorithm
- vscode
- httppretty
- 독후감
- 오큘러스퀘스트2
- codewars
Archives
- Today
- Total
일상적 이야기들.
codewar: Remove First and Last Character 본문
문제
- https://www.codewars.com/kata/remove-first-and-last-character/
문제풀이
- 첫문자와 마지막 문제를 제거하는 문제입니다.
- substring을 이용하여 "두번째, 마지막 전" 까지를 설정하여 문자를 가져오면 됩니다.
public class RemoveChars {
public static String remove(String str) {
// your code here
return str.substring(1, str.length()-1);
}
}
'프로그래밍 > 알고리즘 문제풀이' 카테고리의 다른 글
codewar: Convert a String to Number! (0) | 2019.07.02 |
---|---|
codewar: Where is THB? (0) | 2019.07.02 |
codewar: Fun with lists:indexOf (0) | 2019.06.25 |
codewar: int32 to IPv4 (0) | 2019.06.21 |
codewar: Errors: histogram (0) | 2019.06.21 |
Comments