본문 바로가기

코드카타/코딩테스트35

카드 뭉치 https://school.programmers.co.kr/learn/courses/30/lessons/159994 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr C++ 풀이 :#include #include using namespace std;void DFS(const vector& Goal, const vector& Cards1, const vector& Cards2,int Index, int Count1, int Count2, string& Answer, int& AnswerCount){ if("Yes" == Answer || AnswerCount.. 2024. 8. 27.
크기가 작은 부분문자열 https://school.programmers.co.kr/learn/courses/30/lessons/147355?language=cpp 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr C++ 풀이 :처음에 계속 core dumped오류가 나서 왜이러지? 싶었는데 int로받기에는 문자열 길이가 1만개까지 가능해서 long long으로 받아주니 해결되었다. #include #include using namespace std;int solution(string t, string p) { int answer = 0; long long Nump = sto.. 2024. 8. 25.
이상한 문자 만들기 https://school.programmers.co.kr/learn/courses/30/lessons/12930 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr  C++ 풀이 :#include #include using namespace std;string solution(string s) { string answer = ""; string Str = ""; int Count = 0; for(int i = 0; i    JS 풀이 :function solution(s) { let answer = ''; let n.. 2024. 8. 25.
문자열 다루기 기본 https://school.programmers.co.kr/learn/courses/30/lessons/12918?language=javascript# 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr  C++ 풀이 : #include #include #include using namespace std;bool solution(string s) { bool answer = true; int Size = s.size(); // 48 ~ 57 if(Size == 4 || Size == 6) { for(int i = 0;.. 2024. 8. 22.