Grind75 - 242. Valid Anagram 파이썬
·
알고리즘/LeetCode_Grind75
242. Valid Anagram EasyGiven two strings s and t, return true if t is an anagram of s, and false otherwise. Example 1:Input: s = "anagram", t = "nagaram"Output: trueExample 2:Input: s = "rat", t = "car"Output: false Constraints:1 4s and t consist of lowercase English letters. Follow up: What if the inputs contain Unicode characters? How would you adapt your solution to such a case? 나의 코드from col..
Grind75 - 125. Valid Palindrome 파이썬
·
알고리즘/LeetCode_Grind75
125. Valid PalindromeEasyA phrase is a palindrome if, after converting all uppercase letters into lowercase letters and removing all non-alphanumeric characters, it reads the same forward and backward. Alphanumeric characters include letters and numbers.Given a string s, return true if it is a palindrome, or false otherwise. Example 1:Input: s = "A man, a plan, a canal: Panama"Output: trueExplan..
Grind75 - 20. Valid Parentheses 파이썬
·
알고리즘/LeetCode_Grind75
20. Valid ParenthesesEasyGiven a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.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. Example 1:Input: s = "()"Output: trueExample 2..
Grind75 - 1. Two Sum 파이썬
·
알고리즘/LeetCode_Grind75
1. Two Sum EasyGiven 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 may not use the same element twice.You can return the answer in any order. Example 1:Input: nums = [2,7,11,15], target = 9Output: [0,1]Explanation: Because nums[0] + nums[1] == 9, we return ..
컴공편입생 공부일기
'알고리즘/LeetCode_Grind75' 카테고리의 글 목록 (2 Page)