목록LeetCode (3)
나는 오늘 무엇을 했는가

C++에서 역시 문자열을 그냥 더해서 합칠 수 있었다. vector& strs 이런형식으로 벡터로 들어오면 length()가 아니라 size()로 크기를 측정할 수 있다. 역시 경험을 통한 학습이 중요하다. https://leetcode.com/problems/longest-common-prefix/ Longest Common Prefix - 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 생각의 흐름 1. 입력값 확인 1

C++에도 map이 있다. 배열이든 문자열이든 길이를 알고싶으면 .length()를 사용하면 된다. 문제를 풀고나서 다른사람들이 잘 짠 코드를 살펴보며 벤치마킹한다. https://leetcode.com/problems/roman-to-integer/ Roman to Integer - 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 생각의 흐름 1. 입력값 확인 1 큰수가 나오면 둘의 차이를 빼서 더해줘야하는 부분만 잘 구현해 주면 된다. 3. 결론 그냥 쉬운 구..

C++을 다룬지 오래되었는데 아직 익숙하지가 않은 것 같다. 그리고 뭔가 많이 변한것 같기도 하다. 지금은 좀 코드가 허접하지만 나중에 다시 올꺼다.. ㅠㅠ https://leetcode.com/problems/palindrome-number/ Palindrome 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 생각의 흐름 1. 입력값 확인 Given an integer x, return true if x is palindrome integer. ..