[241216 TIL] 코딩테스트 공부
·
TIL
1️⃣ C++ 알고리즘 코드카타🔹학습 내용📌주의할 점빈칸의 앞뒤 잘 보기예시의 계산 방식을 잘 보기 ❗ New Knowledgesize() : 배열의 길이 리턴for (auto c : str) { 반복문; } : 배열 반복(char), (int) : 형변환isupper() : 대문자인지tolower() : 대문자 -> 소문자toupper() : 소문자 -> 대문자#include #include using namespace std;vector solution(vector cpr) { vector answer = {0, 0, 0, 0, 0}; vector basic_order = {"check", "call", "pressure", "respiration", "repeat"}; for(..