전체 글 (2344) 썸네일형 리스트형 (Bash) - LeetCode (easy) 193. Valid Phone Numbers https://leetcode.com/problems/valid-phone-numbers/description/ Valid Phone Numbers - 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 정규표현식을 사용해보는 문제였습니다. 📕 풀이방법 📔 풀이과정 grep -P를 사용해 정규표현식에 일치하는 행들을 모두 찾아 출력합니다. 형태는 다음과 같습니다. grep -P {정규표현식} {file명} 정규표현식을 생각해봅니다 행의 처음부터 끝사이 숫자3자리-3자.. (C++) - LeetCode (easy) 191. Number of 1 Bits https://leetcode.com/problems/number-of-1-bits/description/ Number of 1 Bits - 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 bitmasking을 사용해보는 문제였습니다. 📕 풀이방법 📔 풀이과정 n의 0~31번째 bit를 검사해서 해당 bit가 1이라면 세줍니다. n & (1 (C++) - LeetCode (easy) 190. Reverse Bits https://leetcode.com/problems/reverse-bits/description/ Reverse Bits - 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 bitmasking을 이용한 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 uint32_t ans, n의 32자리 bit를 확인할 piv를 선언 후 각각 0, 1로 초기화해줍니다. 📔 풀이과정 가장 오른쪽 bit부터검사하면서 &연산시 bit가 1이라면 ans의 가장 왼쪽부터 해당 값을 채워줍.. (MySQL) - LeetCode (easy) 182. Duplicate Emails https://leetcode.com/problems/customers-who-never-order/description/ Customers Who Never Order - 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 left outer join을 사용해 해결했습니다. 📕 풀이방법 📔 풀이과정 Customers table의 기본 key id와 Orders table의 기본 key customerId에 대해 join을 해줍니다. id에 해당하는 customerI.. (MySQL) - LeetCode (easy) 182. Duplicate Emails https://leetcode.com/problems/duplicate-emails/description/ Duplicate Emails - 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 group by를 사용해본 문제였습니다. 📕 풀이방법 📔 풀이과정 집계함수를 쓰기 위해 group by를 사용했습니다. having으로 email에 대한 count가 1초과시 중복되었으므로 해당 email들을 select해줍니다. 📕 Code 📔 MySQL select emai.. (MySQL) - LeetCode (easy) 181. Employees Earning More Than Their Managers https://leetcode.com/problems/employees-earning-more-than-their-managers/description/ Employees Earning More Than Their Managers - 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 inner join을 사용해본 문제였습니다. 📕 풀이방법 Table A, B를 원 형태의 집합으로 표현했을 때 inner join을 하면 칠한 부분처럼 교집합에 해당하는 row들을 얻을.. (MySQL) - LeetCode (easy) 175. Combine Two Tables https://leetcode.com/problems/combine-two-tables/description/ Combine Two Tables - 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 join을 사용해보는 문제였습니다. 📕 풀이방법 left outer join을 사용합니다. A와 B Table을 원 형태의 집합으로 표현했을 때 다음 영역의 data를 뽑아내는 join문입니다. Syntax는 다음과 같습니다. custom가능한 부분 {}로 감싼 부분으로.. (C++) - LeetCode (easy) 171. Excel Sheet Column Number https://leetcode.com/problems/excel-sheet-column-number/description/ Excel Sheet Column Number - 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 간단 구현 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 정답 ans를 선언해줍니다. 📔 풀이과정 alphabat형태를 하고 있으므로 26진수임을 알 수 있습니다. 진법 계산을 columnTitle을 순회하며 완료 후 ans에 해당 자리에 해당하.. 이전 1 ··· 86 87 88 89 90 91 92 ··· 293 다음