Algorithm/LeetCode

    9. Palindrome Number

    문제 링크 https://leetcode.com/problems/palindrome-number/ Palindrome Number - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 접근 먼저, Palindrome은 앞으로 해도 이효리, 거꾸로 해도 이효리 인 글자, 숫자 기타 등등을 의미한다. 이 문제는 Reverse Integer 문제와 똑같은 로직을 사용했다. 10을 이용해서 나눗셈의 몫과 나머지를 이용해서 연산했다. 단, 이번 문제에서 음수는 fals..

    7. Reverse Integer

    문제 링크 https://leetcode.com/problems/reverse-integer/ Reverse Integer - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 접근 입력받은 정수를 순서를 뒤집어서 정수 형태로 반환하는 문제이다. 단, 음수일 경우 그대로 음수로 반환하고, 0일 경우 0을 반환한다. 그리고 끝자리가 0인 경우는 끝에서 2번째 숫자부터 시작한다. 즉, 10을 가지고 입력받은 정수를 계산하여 값을 도출한다. Pseudocode ▶ ..

    3. Longest Substring Without Repeating Characters

    문제 링크 https://leetcode.com/problems/longest-substring-without-repeating-characters/ Longest Substring Without Repeating Characters - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 접근 이 문제는 Two Pointers 알고리즘을 이용해서 풀었다. (Two Pointers 개념은 따로 정리해뒀다.) 문제의 목표는 입력받은 문자열에서 반복하지 않으면서 가장..