목록string (19)
N
https://edu.goorm.io/learn/lecture/33428/%EC%95%8C%EA%B3%A0%EB%A6%AC%EC%A6%98-%EB%A8%BC%EB%8D%B0%EC%9D%B4-%EC%B1%8C%EB%A6%B0%EC%A7%80-%ED%95%B4%EC%84%A4/lesson/1669557/2%EC%A3%BC%EC%B0%A8-%EB%B3%B5%EC%8A%B5%EB%AC%B8%EC%A0%9C-3-%EC%B6%9C%EC%84%9D%EB%B6%80 goorm 구름은 클라우드 기술을 이용하여 누구나 코딩을 배우고, 실력을 평가하고, 소프트웨어를 개발할 수 있는 클라우드 소프트웨어 생태계입니다. goorm.co #include #include #include using namespace std; bool..
https://leetcode.com/problems/repeated-substring-pattern/ Repeated Substring Pattern - 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 문자열 패턴 찾기 문제. 이중 for문으로 쉽게 해결할 수 있다. 먼저 pattern을 0번째 인덱스부터 i번째 인덱스까지 자른다. 그리고 isRepeated라는 flag를 설정하고, 내부 for문이 모두 돌게 되면 isRepated는 바뀌지 않아 패턴 문자열이라..
https://programmers.co.kr/learn/courses/30/lessons/92334?language=cpp 코딩테스트 연습 - 신고 결과 받기 문제 설명 신입사원 무지는 게시판 불량 이용자를 신고하고 처리 결과를 메일로 발송하는 시스템을 개발하려 합니다. 무지가 개발하려는 시스템은 다음과 같습니다. 각 유저는 한 번에 한 명의 programmers.co.kr map을 이용한 문제 풀이. 3개의 map을 선언하였다. reported는 로 유저가 신고를 받은 횟수를 카운팅한다. done은 로 한 유저가 동일한 유저에 대해 신고를 여러번 했는지 확인하기 위한 map이다. target은 = k 이상이면 count++을 해주고, 내부 for문이 끝나면 answer.push_back(count)를..
https://leetcode.com/problems/multiply-strings/ Multiply Strings - 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 문자열로 주어진 두 수를 곱한 값을 리턴. 문자열의 길이가 200이기 때문에 Number 형으로 나타낼 수 있는 수를 초과할 수 있다. 우선 num1과 num2 중 하나라도 "0"이라면 바로 "0"을 리턴. arr는 num1과 num2의 길이를 합한 크기로 선언하여 0으로 초기화한다. 이후, 두 문..

38. Count and Say The count-and-say sequence is a sequence of digit strings defined by the recursive formula: countAndSay(1) = "1" countAndSay(n) is the way you would "say" the digit string from countAndSay(n-1), which is then converted into a different digit string. To determine how you "say" a digit string, split it into the minimal number of groups so that each group is a contiguous section a..
389. Find the Difference You are given two strings s and t. String t is generated by random shuffling string s and then add one more letter at a random position. Return the letter that was added to t. Example 1: Input: s = "abcd", t = "abcde" Output: "e" Explanation: 'e' is the letter that was added. Example 2: Input: s = "", t = "y" Output: "y" Example 3: Input: s = "a", t = "aa" Output: "a" Ex..
387. First Unique Character in a String Given a string s, find the first non-repeating character in it and return its index. If it does not exist, return -1. Example 1: Input: s = "leetcode" Output: 0 Example 2: Input: s = "loveleetcode" Output: 2 Example 3: Input: s = "aabb" Output: -1 Constraints: 1
168. Excel Sheet Column Title Given an integer columnNumber, return its corresponding column title as it appears in an Excel sheet. For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 28 ... Example 1: Input: columnNumber = 1 Output: "A" Example 2: Input: columnNumber = 28 Output: "AB" Example 3: Input: columnNumber = 701 Output: "ZY" Example 4: Input: columnNumber = 2147483647 Output: ..