본문 바로가기

코딩 문제 풀이3

[Leetcode][75. Sort Colors ] 75. Sort Colors 코딩 인터뷰 문제풀이 Java 75. Sort Colors 문제풀이 Sort Colors - 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 이 밑에 방법은, 내가 먼저 혼자 가지고 나온 방법이다. HashMap을 사용할때, 꽤나 유용하게 쓰일 수 있는 `getOrDefault`에 대한 syntax하고 방법도 다시 리마인드가 되어서 좋은 문제라고 생각을 하고 풀었었다. HashMap getOrDefault(key, defaultValue) method in Java with Examples -.. 2021. 12. 10.
[Leetcode][56. Merge Intervals] 56. Merge Intervals 코딩 인터뷰 문제풀이 Java 56. Merge Intervals 문제풀이 Merge Intervals - 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 Example 1:Input: intervals = [[1,3],[2,6],[8,10],[15,18]] Output: [[1,6],[8,10],[15,18]] Explanation: Since intervals [1,3] and [2,6] overlaps, merge them into [1,6]. Example 2: Input: interv.. 2021. 12. 8.
[Leetcode][53. Maximum Subarray] 53. Maximum Subarray 코딩 인터뷰 문제풀이 Java 53. Maximum Subarray 문제풀이 Maximum Subarray - 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 난이도는 Easy. 굉장히 흔히 볼 수 있고 접할 수 있는 문제라고 생각한다. 항상 (적어도 미국에선) 코딩인터뷰에서 중요한건, 문제를 다 풀고 아니고가 아니라, 이 사람이 어떻게 "생각"하는지를 보는 것 같습니다. 결국 코딩으로 완벽한 답을 못해낼지언정, 이 사람이 문제에대해 어떻게 접근하는지를 보고싶어하기에, 항상 코딩으로 바로 넘어.. 2021. 11. 26.
반응형