← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
Write a program to parse a given log file and count the occurrences of each item, then return the top N items based on their count. Assume each line in the log file represents an item, and all items are strings.
Implement a function parse_log_and_find_top_n_items(log: List[str], n: int) -> List[str].
Note: For items with the same frequency, sort them alphabetically.