I hereby claim:
- I am naveedehmad on github.
- I am naveed (https://keybase.io/naveed) on keybase.
- I have a public key whose fingerprint is 62FF 4E3B AFC7 DB0F A3E4 52AD 48E9 B7C7 2910 5135
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
def count_chars(input_string) | |
char_count_map = {} | |
char_list = [] | |
input_string.chars.each do |ch| | |
if not char_count_map.has_key?(ch) | |
char_list << ch | |
char_count_map[ch] = 0 | |
end | |
char_count_map[ch] += 1 |