Word Order
-
Practice>Python>Collections>Word Orderhackerrank.com 2019. 2. 25. 13:16
hackerrank.comWord OrderProblem link : https://www.hackerrank.com/challenges/word-order/problemDifficulty : Medium TipProblem is to check that you utilize defaultdictUse input as a key of defaultdict+1 as per input word Solution from collections import defaultdict dic = defaultdict(int) cnt = int(input()) for _ in range(cnt): w = input() dic[w] += 1 print(len(dic)) v = dic.values() v = list(v) s..