본문 바로가기

c++19

242. Valid Anagram C++문제 풀이 242. Valid Anagram Easy 5643231Add to ListShare Given two strings s and t, return true if t is an anagram of s, and false otherwise. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once. 두 개의 문자열 s와 t가 주어지면 t가 s의 아나그램이면 true를 반환하고 그렇지 않으면 false를 반환합니다. Anagram은 일반적으로 모든 원래 문자를 정확히 한 번 사용하여 다른 단어 또는 구.. 2022. 7. 20.
387. First Unique Character in a String 문제풀이 387. First Unique Character in a String Easy 5340207Add to ListShare Given a string s, find the first non-repeating character in it and return its index. If it does not exist, return -1. 단 한번만 쓰여진 문자형을 찾아 그 index를 retrun 하면 된다. Example 1: Input: s = "leetcode" Output: 0 Example 2: Input: s = "loveleetcode" Output: 2 Example 3: Input: s = "aabb" Output: -1 Constraints: 1 2022. 7. 19.
415. Add Strings 문제 c++ 415. Add Strings Easy 3455574Add to ListShare Given two non-negative integers, num1 and num2 represented as string, return the sum of num1 and num2 as a string. You must solve the problem without using any built-in library for handling large integers (such as BigInteger). You must also not convert the inputs to integers directly. 큰 정수(예: BigInteger)를 처리하기 위해 내장 라이브러리를 사용하지 않고 문제를 해결해야 합니다. 또한 입력.. 2022. 7. 10.
125. Valid Palindrome 문제 A 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. 모든 대문자를 소문자로 변환하고 영숫자가 아닌 문자를 모두 제거한 후 앞뒤로 동일하게 읽는 경우 구는 회문입니다. 영숫자 문자에는 문자와 숫자가 포함됩니다. 문자열 s가 .. 2022. 7. 10.