Showing posts with label Bronze Medal. Show all posts
Showing posts with label Bronze Medal. Show all posts

Thursday, June 28, 2018

First medal in 2018, Bronze medal

June 28, 2018

Introduction


It is time for me to celebrate small success for week of code 38 bronze medal today. I was waiting for the bronze  medal since this Monday. I did write a blog called tangible goals, I like to achieve small goals first and help me to get back on track.

I should push myself hard and work on the contest last Saturday, so I could have enjoyed the time to solve hard level and expert level algorithm. Every time I have problems to solve the hard level algorithm, I find myself so happy to spend hours to study and try to solve the problem. Even scoring 0 will make me so happy. I just like to learn something new.

Keep good habit


It is good idea to keep good habit and do not give up. It takes time to build up a good habit. It is like sports training, once I have so many good friends on tennis court. It is so easy for me to go out to play tennis.

I have built a few good habits to do things last 18 months. I have weekend day for whole day mock interviews. I have good habit to keep being interviewer last 6 months to be an interviewer.

I need to build a new habit for one weekend day for frontendmaster.com courses, one weekend day for pluralsight.com. Those are two new habits I like to have.

Let us get all facts together


I score 10% of whole 300 points.
I played last day of week of code 38 only.
I got last hour to push myself from bottom 20% to top 25%
Here is the comparison to rank no. 1
Here is the folder to contain all three algorithms I solved

Last Saturday I did not work on the contest, why?
Motivation issues - what to work on? How to motivate myself to get a Gold medal?
Easy level second algorithm, I only scored 30% all possible points I could get

30 minutes to study leadboard of Canada
One profile with Hackerrank solution on youtube.com is here.


Sunday, April 30, 2017

Talent small talk

April 30, 2017

Introduction 


It is a very happy weekend with a world codesprint contest and then two mocking experience. Julia also spent one hour to play some tennis and felt much better after she ran 30 - 45 minutes, she was amazed that her muscle memory of tennis was so good, she could control tennis balls so well through a full court rally. She enjoyed the sliced shot and very good timing and control of landing position to hit a stroke.

She also felt that it is important to seek the advice to be a just-so-so contest player scoring 36 points over 13 hours compared to top players scoring more than 280 in less than 2 hours. Read those data - less than one hours 10 minutes, top number 1 - Gennady.




What are the missing parts she should work on next?

A lot of professional WTA tennis players are very good at changing coaches when they deal with up-and-downs. What does Julia do for this case? Should she change her coach? She is self-coaching and writing blogs to keep tracking of her progress.

Need a therapy after the contest. Remember the favorite video she watched about Roger Federal talking about his early age, throwing tennis racquet in front of thousands fans. Take some time to learn from Roger Federer.

Watch this video to get entertained. Roger Federer - top 10 smiling after points lost, link is here.

Talent talk 


Where is the talent? I like to find some drills to work on to help myself to cover the weakness of talent. 

Watch the video - tennis funniest moments ever. Link is here. And read the article - waste time is healthy in big data term, link is here

Data structure talk 



Julia met a same person for the second time in less than 30 days through mocking experience, and then she learned a few things through 30 minutes. Friendship forms quickly after the first experience.

Case 1: She likes to design a data structure to return a list of pair integer numbers in the array, she said that since it is the unknown size, she likes to declare C# IList<string>, and then "why it is string?" The peer asked, Julia said that because there are two numbers, I like to encode and decode like a + b; otherwise I like to use Tuple<int, int>, the peer just typed that you just use this one IList<int[]>.

Julia never uses this one before, but it is so good ride once she uses it. Story is short, better give a good name "int[] beats string".

Case 2: Julia likes to change HashSet to a Dictionary<int, Object>, and then the peer asked, can you make a minor change to fit the requirement; Julia was told to finish the coding, and do a whiteboard testing using a test case. Do mocking algorithm really need Dictionary that complicated?

Through the discussion, Julia learned that it is a good practice to write simple code. Be more organized!

Transcript is here. Later it will be compiled to C# code.

Recurrence formula talk 



It comes out that the recurrence formula is challenging for those 3  talented programmers in the world last weekend. In other words, Julia used the same algorithm to interview two people last weekend.

Her first interviewee was troubled, confused, since the problem statement is wrong, and Julia had difficult time to step in and give good hints to guide, since Julia had a math degree but it is like the muscle to fat story, she also got confused on recurrence formula in those 30 minutes. But then second time to use the algorithm, Julia was more determined to apply recurrence formula, no more playing with test cases. Just write down clearly the formula first.

The interviewee is much quickly to take hint, and then write code. She felt those two difference. Less experienced one is much more easy to try new things.


Also Julia learned the algorithm quickly, when she interviewed second person using same algorithm, she wants to make the difference. She learned that good interviewer should do something to help out. 

Whiteboard technique



From the contest to the leaderboard by Microsoft to a blog writer -

Google intern and interview blog is here. Whiteboard talk is excellent.

Bronze medal talk



It is the time to celebrate Julia’s fifth bronze medal, Julia got a bronze medal for world codesprint 10. How to express the feeling of bronze medal? Julia likes the hard work she put in those hours, and she did so much work and tried again and again for new ideas to break through the hurdles. She is more experienced to play contests now compared to last year.

Julia takes time to enjoy her status right now, one day she will easily make over 30% or over 100 points and come back to look at the stage she is in. Honestly the contest is like school home work, and bronze medal is for Julia to celebrate a grade “C”, but she tries to get grade B – silver medal, one day she can get grade A. Julia scored 36 point (360 maximum points), 10% scoring. 


Julia likes the competition because it is fair, open and her peers are all over the world. Compared to take algorithm course in university to learn more, she does not need to figure out who is the professor in the university, fair or not fair on grading. All she has to do in the competition is to work damn hard, write down something, either a blog, or code or analysis. Dedicate a few hours on each algorithm in the contest. From there she can continue to work on after the contest. 

Psalm 126:5 Those who sow with tears will reap with songs of joy.
6 Those who go out weeping, carrying seed to sow, will return with songs of joy, carrying sheaves with them.

Julia sowed, teared, reaped, sung, weeped, carried.

Follow up on data structure talk 


In previous data structure talk, Julia shared the story about mocking experience. The peer coached her to use int[] instead of using string or Tuple<int, int>. Such a wonderful coaching through mocking experience.

Afterwards, Julia asked her favorite algorithm coach JS1 on code review about using int[] data type compared to string related to Queue. Here is the algorithm question on code review. 

do you think that it is also good idea to declare var queue = new queue<int[]>? row and col can put into the array new int[2]. Therefore, we do not need to encode a key and then decode the key to row and col two variables. I am learning data structure and try to speed up coding. – Jianmin Chen

It's a matter of preference. I tend to use primitive types whenever possible, but if using int[] seems easier to understand than using a single int, then you should do that. Note that using a single encoded int leads to a simpler visited array as well. – JS1 

Monday, February 20, 2017

Hackerrank university code sprint #2 - Bronze medal

Feb. 20, 2017

Julia was so happy to know that she got a bronze medal for her most favorite codesprint - university codesprint. She scored 50, spent more than 15 hours, compared to highest rank scoring 100%, score 430, in less than 3 hours, she has a long way to go. But she knew that how hard she has to work on, to make that extra 30 points, her last university codesprint was 20 points, because she spent over 10 hours to work on hard algorithm array construction, ended up scoring 0 on the algorithm.

The university codesprint is by far most challenge codesprint one.

She did look up ranking in Canada, and tried to learn through leaderboard, she ranks at 38, and also she found a good article to read from Bai Li, ranking , score 179.80, 245/6591.

Read his blog about competition programming to talk about rankings.

Study other players, and try to figure out how they got so advanced skills in competitive programming. 


Bai Li - HackerRank
How to succeed in your intern?
Erick Lin - How does an undergraduate do?

Hieu Le

Corey Chen

Marek Cygan
Abu Naser Bikas

competitive programming blog

Wednesday, December 28, 2016

HackerRank - week code 27 - Bronze medal III

Dec. 28, 2016

Introduction
As a hackerrank player, Julia has over 8 months experience. She just likes to be a weekend hackerank player. But she could not find anything in late December, she was busy with holiday parties and missed one contest in December.

But at the end of December, she studied the code written by over 20,000 players, and found one of players played a lot of week code contests.

So, Julia played the week code 27, and she had good time to play and learn something new.

Workout

Facts:
Worked on 5 algorithms -
first one, tailor shop, hackonacci matrix rotation, zero-move nim, last one: how many substrings

Her most favorite algorithm, it is an easy algorithm. But it is fun and a lot of challenging for her. Time complexity is the biggest concern.

Tailor shop


And then, she worked hard on the algorithm, she just enjoyed and then was happy that recursive function does some work for her; and took 1 or 2 hours to study game - Nim, and had a good time to study some game, mathematics.

Hackonacci matrix rotation

score 4 - maximum score 40

Preprocessing, and time complexity is the biggest issue


Zero-Move Nim

Her practice on recursive solution (2+ hours), score 5 - maximum score 50
A lot of fun to practice - learn recursive function
https://gist.github.com/jianminchen/6c0dea2e0f6d500543db06ff640005a9

Using nim sum:

https://gist.github.com/jianminchen/cf2544581810f6f0c614ecc4184861ae

Study code submitted by Google employees:

Java code:

C++ 14 code

C++ 14




How many substrings




Tip to share:
Read discussion on HackerRank, and find out top players - what they are discussing, tips they share in the contest or after the contest.




Monday, September 26, 2016

HackerRank - World code sprint #7 - summary

Sept. 26, 2016
Good news! A bronze medal! Top 25%.

  It was a busy weekend, Julia spent over 10 hours a day on algorithm problem solving, scored 67.81, ranked 737/ 5269 at 12:27am, 9/26/2016, still 7 hours left. Usually China is day time next 7 hours, the rank will go down more.

  The experience was so different from her practice on Leetcode algorithm. She learned some new skills through long hours struggling. Most of things are about how to scale large data, timeout issue, out-of-memory. She found out the joy of programming.

  Some facts to set high standards, try to get into top 12% of contest, despite lack of preparation:

  It is a 48 hours contest. Saturday and Sunday two days.

 1. She only did one mile driving on last Sunday to spend 30 minutes to do grocery shopping, and two days to stay at home, worked on the algorithms.

  2. On Saturday, spent 8+ hours to work on an algorithm using interval (Leetcode 56: Intervals), worked on timeout, design issues, space issues - out-of-memory. Score 20 out of 20 after 8 hours work.

  3. On Sunday, spent 8+ hours to score 20 out of 40 - DP problem.
Still timeout, DP solution is not fast enough.
Spent  first 2 hours to work on dynamic programming test cases, figured out the recurrence formula.



Actionable items:

1. Spend some time to read those blogs about contests, figure out what to learn from. (plan to read 2 - 3 hours)

http://blog.csdn.net/philipsweng

How other people review their contest?  (Ranking: 14/5000, score 345/ 400)

http://blog.csdn.net/philipsweng/article/details/51730709

2. read blog 2+ hours, find ideas to work on
https://www.quora.com/profile/Bohdan-Pryshchenko

HackerRank profile:
https://www.hackerrank.com/I_love_Tanya

3. another one:
https://www.quora.com/profile/Joshua-Pan-1

https://goo.gl/K3iYRY

4. Read some algorithms: (instead of Googling, use the website for reference - catch up - reading - plan to spend first 3 hours on this)
https://www.hackerearth.com/practice/algorithms/dynamic-programming/bit-masking/tutorial/

Another favorite of mine is — #2 HackerEarth (includes tutorials and separated into categories/sorted easiest to hardest)Algorithms Tutorials & Practice Problems
  • A note about this: I really enjoyed HackEarth’s previous practice section (it was a lot better formatted). If anyone can get this to HackerEarth executives, that would be a great piece of advice for them.

  Will document more later.
5. 9/28/2015
Some analysis - Julia only can score 15% (70/ 400) compared to best talent people in the world, if she works damn hard. Time wise, she could not solve difficult level algorithm yet, no data. 15% wise, She only score 70/400 in code sprint, but best one scores 400 in less than 10 hours.

But through the contest, she knows that she can close the gap and measure the progress in every month, every contest. Set up 5 stages - 15%, 25%, 30%, 40%, 50%, and relax and enjoy problem solving day by day.


Monday, August 29, 2016

Beautiful 3 set - code study

August 29, 2016

Plan to work on difficult level algorithm - world code sprint #6. Plan to work on world code sprint some day, be able to solve difficult/ advanced algorithm.

https://www.hackerrank.com/contests/world-codesprint-6/challenges/beautiful-3-set

Will come back very soon to work on this algorithm.