-
Practice>Python>Collections>Collections.OrderedDict()hackerrank.com 2019. 2. 14. 18:05728x90
Collections.OrderedDict()
Problem link : https://www.hackerrank.com/challenges/py-collections-ordereddict/problemDifficulty : easyTip
- the sequence of input should be ordered, so it is good to practice how to use OrderedDict()
- Utilize rpartition() or rfind() to split name and price
- Check the name is existed in orderedDict
- If it is, add price
- If not, add new name and price
Solution
728x90'hackerrank.com' 카테고리의 다른 글
Practice>Python>Math>Triangle Quest 2 (0) 2019.02.22 Practice>Python>Date and Time>Time Delta (0) 2019.02.17 Practice>Python>Errors and Exceptions>Exceptions (0) 2019.02.14 Practice>Python>Date and Time>Calendar Module (0) 2019.02.13 Practice>Python>Sets>Symmetric Difference (0) 2019.02.13