Skip to content

Instantly share code, notes, and snippets.

View kurojs's full-sized avatar
🦔
Never back down, never what?

kuro kurojs

🦔
Never back down, never what?
  • Viet Nam
View GitHub Profile
@kurojs
kurojs / solution.cpp
Created April 27, 2020 01:25
Word Count Engine
#include <iostream>
#include <string>
#include <vector>
#include <unordered_map>
#include <map>
using namespace std;
// Time complexity: O(N) for making occ map, O(logN) for making sorted map, and O(N) for buil the answer. So total is O(2N + logN)