https://leetcode.com/problems/top-k-frequent-elements/ Top K Frequent Elements - LeetCode Can you solve this real interview question? Top K Frequent Elements - Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order. Example 1: Input: nums = [1,1,1,2,2,3], k = 2 Output: [1,2] leetcode.com Given an integer array nums and an integer..
https://leetcode.com/problems/group-anagrams/ Group Anagrams - LeetCode Can you solve this real interview question? Group Anagrams - Given an array of strings strs, group the anagrams together. You can return the answer in any order. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase leetcode.com Given an array of strings strs, group the anagrams toget..
https://leetcode.com/problems/valid-anagram/ Valid Anagram - LeetCode Can you solve this real interview question? Valid Anagram - Given two strings s and t, return true if t is an anagram of s, and false otherwise. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using leetcode.com Given two strings s and t, return true if t is an anagram ..

๋ฌธ์ ํ๋ก๋ ์์ฃผ JOI์กํ์ ์์ ๋ฌผ๊ฑด์ ์ฐ๋ค. JOI์กํ์ ์๋ ์๋์ผ๋ก 500์, 100์, 50์, 10์, 5์, 1์์ด ์ถฉ๋ถํ ์๊ณ , ์ธ์ ๋ ๊ฑฐ์ค๋ฆ๋ ๊ฐ์๊ฐ ๊ฐ์ฅ ์ ๊ฒ ์๋์ ์ค๋ค. ํ๋ก๊ฐ JOI์กํ์ ์์ ๋ฌผ๊ฑด์ ์ฌ๊ณ ์นด์ดํฐ์์ 1000์ ์งํ๋ฅผ ํ ์ฅ ๋์ ๋, ๋ฐ์ ์๋์ ํฌํจ๋ ์๋์ ๊ฐ์๋ฅผ ๊ตฌํ๋ ํ๋ก๊ทธ๋จ์ ์์ฑํ์์ค. ์๋ฅผ ๋ค์ด ์ ๋ ฅ๋ ์1์ ๊ฒฝ์ฐ์๋ ์๋ ๊ทธ๋ฆผ์์ ์ฒ๋ผ 4๊ฐ๋ฅผ ์ถ๋ ฅํด์ผ ํ๋ค. ๋ฌธ์ ์๊ตฌ์กฐ๊ฑด 1. ์๋ 500,100,50,10,5,1์ด ์๋ค. 2. ๊ฑฐ์ค๋ฆ๋ ๊ฐ์๋ฅผ ๊ฐ์ฅ ์ ๊ฒ ์ค๋ค. 3. ์๋ ๊ฐ์๋ฅผ ์ถ๋ ฅํ๋ผ. count๋ for๋ฌธ์ ๋๋ฉด์ ๋ชซ์ ๊ตฌํ ๊ฒ์ธ๋ฐ 200์์ด ๋จ์๋ค๋ฉด ๋ชซ์ด 2๊ฐ ๋ ํ ๋ ๋์ 2๊ฐ์ ๊ฐ์ ์๋ฏธ์ด๋ค. ๊ทธ๋ค์ ๋๋จธ์ง ๊ธ์ก์ ์๋์ ๋ค์ ๋์ ํ์ฌ ๊ณ์ฐํ..