본문 바로가기 메뉴 바로가기

Studying programming

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

Studying programming

검색하기 폼
  • Jimin's Programming (194)
    • Algorithms (54)
    • JavaScript (16)
    • Vue.js (3)
    • Node.js (3)
    • React.js (7)
    • React Native (0)
    • Spring Boot (13)
    • JAVA (58)
    • C++ (17)
    • Programming (19)
    • Computer basics (4)
  • 방명록

String int 변환 (1)
<프로그래머스 알고리즘문제> Convert String to int

문제 설명문자열 s를 숫자로 변환한 결과를 반환하는 함수, solution을 완성하세요.제한 조건s의 길이는 1 이상 5이하입니다.s의 맨앞에는 부호(+, -)가 올 수 있습니다.s는 부호와 숫자로만 이루어져있습니다.s는 0으로 시작하지 않습니다.입출력 예예를들어 str이 1234이면 1234를 반환하고, -1234이면 -1234를 반환하면 됩니다. str은 부호(+,-)와 숫자로만 구성되어 있고, 잘못된 값이 입력되는 경우는 없습니다. 풀이 1234567class Solution { public int solution(String s) { int answer = 0; answer = Integer.parseInt(s); // Integer.parseInt() convert a String to int ..

Algorithms 2019. 1. 15. 13:57
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
  • code refactoring
  • hackerrank
  • hackerrank javascript
  • equals()
  • 프로그래머스
  • repeat()
  • HackerRank Algorithm
  • easy javascript algorithm
  • ... in Javascript
  • java
  • spring boot application
  • hackerrank javascript solution
  • 프로그래머스 알고리즘문제
  • Collection Framework
  • string class in java
  • 알고리즘
  • math.max
  • substring()
  • Javascript Algorithm
  • hackerrank solution
  • compareTo()
  • HashMap
  • 프로그래머스 알고리즘
  • Object type casting
  • rest parameter
  • C++
  • javascript
  • easy algorithm
  • math.abs
  • algorithm
more
«   2025/06   »
일 월 화 수 목 금 토
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
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바