Sunday, June 12, 2016

HackerRank: Sherlock and anagram - warmup practice after 3 months

June 12, 2016

Introduction 

First, software coding -> tennis sports -> gardening - a small talk 

Julia likes blossom of flowers, she enjoyed but does not have time to do any gardening work. She spends a lot of hours on tennis court to keep her physical fit, cheer her up, play social games to build up very good team sports spirit through her workout. 

She observes neighborhood gardeners watering the flower, grass every day in summer time, in the city of Vancouver,  it takes a lot of hard work. She enjoys the neighborhood gardening. 

So, to show some talent in software coding, she likes to learn from a patient gardener, watering, taking away weeds. In other words, read her own coding blog, learn to educate herself better through the short period of time.  

Today, she likes to bring back her favorite practice 3 months ago, an algorithm - "Sherlock and anagram", and then review them, write more practice. 

3 months is not long time, but those past 3 months, Julia found out that she is street-smart again. She starts to get more organized, more time-savvy, and know the importance to push herself to write her own words about experience. It does help. 

One example, she stops to check in C# file using github, she just uses gist to quickly create a link. She did create almost 300 gists, each gist saves 5 minutes compared to check in files using github, she saved 1500 minutes, close to 25 hours time. 

Another example, she tries to focus on reasoning and analysis, writing things to help her solve problem. One problem a time. So, she works on one problem, using more than 5 solutions - BFS, DFS, using Queue, using Stack, phone number problem, therefore, she can apply the problem solving to all other similar problems. 

Workout 

Now, work on the coding:

1. HackerRank: Sherlock and anagram - 7 blogs with practices
Practice on HackerRank is like to play tennis sports, you have to experience various hitting partners, good workout!

No. 1.
http://juliachencoding.blogspot.ca/2016/03/hackerrank-string-sherlock-and-anagrams.html

No. 2
http://juliachencoding.blogspot.ca/2016/03/hackerrank-sherlock-and-anagrams-ii.html

No. 3

http://juliachencoding.blogspot.ca/2016/03/hackerrank-sherlocks-and-anagram-ii.html

No. 4 Study 6 solutions - Julia chose from over 200 solutions
http://juliachencoding.blogspot.ca/2016/03/hackerrank-sherlock-and-anagrams-iv.html

Julia, work on this code, and put test case in, write your own C# practice:
study the code, order by values,  not by key, try it!
https://gist.github.com/jianminchen/ffcca0582b5f0d1d6a9b

study the blog: Dictionary OrderByDescending
https://goo.gl/6ZbTPz
baby step to learn C# Dictionary class API - Order by and distinct
https://gist.github.com/jianminchen/eff03bea08a95061deb4185af74fea18

No. 6
http://juliachencoding.blogspot.ca/2016/03/hackerrank-sherlock-and-anagram-vii.html

Warm up 12 solutions - "Sherlock and anagram" one by one. Each one for a blog. Focus on speed, correctness.

No comments:

Post a Comment