FrontEnd/leet code(3)
-
[leet code - easy] Valid Parentheses 문제 풀이
Description Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. s는 (),{},[]만 들어갈 수 있나봄 An input string is valid if: Open brackets must be closed by the same type of brackets. Open brackets must be closed in the correct order. Every close bracket has a corresponding open bracket of the same type. 열림 기호랑 닫힘 기호 둘 다 있어야 하나봄 근데 정확하게..
2023.08.23 -
[leet code - easy] Palindrome Number 문제 풀이
Description Given an integer x, return true if x is a palindrome, and false otherwise. 리버스 된 게 x랑 같으면 true 라는 것 같음 입출력 예시 Example 1: Input: x = 121 Output: true Explanation: 121 reads as 121 from left to right and from right to left. Example 2: Input: x = -121 Output: false Explanation: From left to right, it reads -121. From right to left, it becomes 121-. Therefore it is not a palindrome. Exam..
2023.08.22 -
[leet code - easy] two sum 문제 풀이
수학적 머리가 아예 없는 듯 하여 수리논리력을 좀 키워보고자 알고리즘 문제를 풀기로 함 프로그래머스도 좋지만 영어공부도 같이 하려고 친구한테 추천받은 leet code 도장깨기를 할 것임 medium까지 다 풀 수 있으면 해외 취업도 삽가능이라고 하길래 medium까지 다 풀어보는게 목표임 근데 한문제 푸는데 5시간 걸리는거 맞나.... Description Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you ma..
2023.08.21