Thursday, January 5, 2017

The kth largest element from two sorted arrays

January 5, 2017

Introduction
Spent over 2 hours to study Leetcode 4 and Leetcode 215: the medium of two sorted array, and then Leetcode 215: the kth largest element from the array, and then, Julia spent over one hour to work on the code for the algorithm: the kth largest element from two sorted array.

Workout

Here is the C# practice: binary search, time complexity: not O(lg n + lg m), smaller one: O(lg(n+m)), n, m are the length of two sorted arrays.

Julia likes to work on the test case a little more time, 20 - 30 minutes, and then post the algorithm on stackexchange.com for a code review.

Read the article again, learn more about the analysis.

January 9, 2017
The most important feedback about the code - code review:
Just so you know, your solution appears to be O(logk(n+m)). The reason is that ArraySplice() makes a copy of the array, which takes either O(n) or O(m) time. If you would just avoid doing the copy and instead pass a starting index for each array to your function, you would be down to O(logk) time. – JS1

Actionable Items:

1. Read a few articles about the algorithm, list here:

2. Write a new version of algorithm to solve all issues, post it on code review. Learn by doing.

3. C# practice with the correction of time complexity issue - array splice. Code is here.

Code review by user (II)

January 5, 2016

Review all 65 question asked by one user.

1. Buy once and sell once for maximum profit

solutions for 3 algorithms: once, twice, or at most twice

Leetcode 223 rectangle area - solution with a graph

3. Find median of two sorted arrays

Review the blog written in 2015, and one in 2016. 

Leetcode 215 Julia's C# practice

Code Review: Social network broadcast message algorithm

January 5, 2017


Read two code reviews:

1. Social network broadcast message algorithm


Code Review: Minimum Spanning Tree

January 5, 2017


Review minimum spanning tree

Minimum Spanning Tree using Prim's algorithm


Look into those reviews: very good advice about global variable


Wednesday, January 4, 2017

Leetcode 333: Largest BST subtree

January 4, 2016

Start from here, and then study the code written by the expert.

Top-down O(n!) vs bottom-up O(n), very good discussion. Here is the link.

Leetcode 210: Course Schedule (II)

January 4, 2016

Review Leetcode 210.

Study the solution here first.

Review previous practice here.

Just warm up graph algorithm in 30 minutes:
Study graph on code review website on stackexchange.com.


  1. First review of BFS, DFS - Excellent review link is here
  2. Implementation of Graph - Good review link is here
  3. Implementation of Dijkstra's algorithm

[interview-questions] graph keyword search: 35 posts sorted by vote 

  1. Find if a word with wildcard exists in dictionary [closed]

     Good lecture about test driven development


Monday, January 2, 2017

Algorithm study

January 2, 2017

Plan to spend some time to go over the algorithms one by one.

Go over those algorithm first:
K Closest Points
Longest Palindrome
Rectangle Overlap
Window Sum

Copy List with Random Pointer
Five Scores
Maximum Subtree
Minimum Spanning Tree
Order Dependency

Coding Questions:

A
Arithmetic Sequence

B
BST Minimum Path Sum

C

D
F

G

I

K


L

M

Leetcode 240: Search a 2D Matrix

January 2, 2017

Problem statement

Introduction

Study the code written in two solutions, first one is time complexity O(log(m*n)) using binary search and second one using binary search is O(logm + logn).

Workout

Study C++ code first. 





Matrix Rotation Study

January 2, 2017

Introduction
Julia learns the hard way. This past 2016, Julia worked on matrix rotation practice (No.1) again in April, 2016, she failed to deliver the ideal result in one hour setting. And then, she came back to work on matrix rotation so many times. Hackonacci Matrix rotation - algorithm on HackerRank week code 27, Julia spent more than 4 hours to review all submissions, she did learn the hard way - in the contest she spent more than 3 hours to write code, but scored less than 10% in Dec. 2016.

Now, she came cross this study about using transpose and flip code again, now she was smart and mature enough to take it and be the master of matrix rotation time saver.


Workout

Use transpose and flip operations


Another code of transpose and flip with a flag to separate clockwise from anti-clockwise.

Julia's C# practice.

Sunday, January 1, 2017

Hackerrank - Ad Infinitum 17

January 1, 2016

Julia likes to get more experience to play contest, she is very busy on January 1, but she likes to spend 2 - 3 hours to work on the contest, and get some experience.

Focus on reading, be able to understand the algorithm, improve her English reading, solve problems quickly.

Will come back very soon.

2017 New Year's day - Code Review: Connected Cell in a Grid

January 1, 2017

Ask questions on code review.

Connected Cell in a Grid - Warm up with Five Practices

Spent 2+ hour to put together C# code to post a review request.

Ask ideas how to add some debug code to track quickly/ efficiently the design:

1. Queue - in/ out as designed
2. Connected Region - counting of cells is correct
3. Check how many regions are counted
4. Basically, talking about tips to help development of code, not affect the presentation of code.

Here is the code review feedback:
boundary check and user input handling




Hackerearth "January Easy '17 contest" Simple Function

January 1, 2017

Plan to attend 8:00 - 11:00am hackerearth.com

January Easy '17 contest

Work on the algorithm:

January Clash '2017


- One of 6 algorithms: Simple Function

In contest performance, C# solution, pass test case 1, but timeout all other cases. (9:00am - 11:00am)

C# solution, passed 5 test cases, fail last one. (after the contest, 2+ hours)

Study code C++

Write C# code using the above solution. (Time spent: 4 + hours, completed at 6:37pm)

Code Review Link is here. Julia spent more than one hour on January 3, 2016 to add her calculation of cache size reduction from 2MB to 80KB based on the comment from Paparazzi


January 7, 2016
Continue to do some research on C# Dictionary comparison to self-defined hash function to do pre-processing.

Using Dictionary<string, int>

C# with Dictionary code:

Test result from hackerearth.com:

The time complexity analysis:
function CalculateSumOfEvenNumbers(), inside two loops, function GetLastDigit(...)
is called; inside GetLastDigit() function, there is a HashSet to prevent
duplicate calculation, and then, GetLastDigit() is called; inside GetLastDigit(),
two calls of the function GetDigits(). Actually, we only care about two integer
number, biggest same digit, and we do not care about how many digit inside
each integer. And this approach goes over each digit in the integer.



Self-defined hash function

Comparison to the self-defined hash function - code is here:
The performance:
Time analysis:

For each query, process two baskets of integers,  two separate loops, O(N1 + N2), detail see function ProcessInput(...); For each number, call Hash function to process, any number is at most 4 digits, each digit, only do one calculation to determine the digit from 1 to 9. Just a minus arithmetic calculation. Detail see the function Hash(char[] cache, int nthNumber, int serialNo)

To calculate the even number count, call function CheckNumberIsEven(...) N1 * N2 times, each function call, only need to look up at most 10 times, find a match then break the loop.

So, overall, time complexity is O(N1+N2) + O( N1*N2), is around O(10^6) calculation of CheckNumberIsEven function which includes a few of arithmetic calculations; the self-defined hash function is almost less than 1 percent of time to compare calculation the even number count.

Digits Internal Class

Another C# version, no Dictionary, just use int[10] to store an integer, with digits. No string manipulation to get the substring. Pass all test cases. Code is here.

Performance:


HashedInteger Class

Digits class name is not very meaningful, so HashedInteger class name is chosen to replace Digits.
And also Save API is not clear, add Convert, ConvertAll APIs instead.

The code is here.







Saturday, December 31, 2016

Code Review - Find biggest basin

Dec. 31, 2016

Find biggest basin


Julia's favorite review: 

http://codereview.stackexchange.com/a/49477/123986

Julia, write a C# practice as well.

BFS/ DFS algorithms' Review

Julia, please review BFS/ DFS algorithms practiced this year.

Search blog using keyword: BFS

1. Connected Cell in a Grid - Warm up with Five Practices

Use Queue/ Stack/ Recursive function, get familiar with all five algorithms.

2. Leetcode 317: Shortest distance from all buildings



Code Review - Find intersections of overlapping intervals

Dec. 31, 2016


Introduction:



Code Review study:

Find intersections of overlapping intervals

[interview-questions] views:10000..50000 - 3 hours workout

Dec. 31, 2016

Introduction
Julia has to teach herself to be patient, she has to slow down and then learn one algorithm a time. She tries to figure out if she can use the following as a ritual - code review study on stackexchange.com:

1. Read the algorithm
2. Understand the algorithm - write some notes
3. Try to think about it by herself
4. Read the algorithm
5. Have some code review by herself
6. Read other people's review



Workout

Search keyword:
[interview-questions] views:10000..50000 - 3 hours workout

26 algorithms:

No. 1 1:03pm - 20 minutes

Searching an element in a sorted array


No. 2 

Interview coding test: Fizz Buzz


No. 3   2:10pm - 20 minutes reading - 

Find all the missing number(s)


Highlights of great review:
http://codereview.stackexchange.com/a/48775/123986

I would also like to see some verification of the method preconditions given. 

No. 4


Julia tastes the success and hunger for more.

Friday, December 30, 2016

Leetcode study

Dec. 30, 2016

Plan to read a few algorithm on this blog:

https://anothercasualcoder.blogspot.ca/


Code Review - Counting Inversion

Dec. 30, 2016

Study the algorithm on code review:

Counting Inversions

Previous study:

Count inversions - Extended merge sort - 3 Lecture Notes Study


Goal:

1. Time complexity: O(n*) -> O(nlogn)

2. Review the process of analysis by following lecture notes, the recurrence relationship using divide conquer - T(n) = 2*(T/2) + O(n), and then, using the combinatorics - do some analysis on the time complexity.

Master Theorem - Get back to the basics!





Code Review - Study by user

Dec. 30, 2016

Study the user and find out best algorithms to study.

http://codereview.stackexchange.com/users/9452/josay?tab=tags

This one is my favorite:

 http://codereview.stackexchange.com/a/41140/123986


How to make good search on code review?

Dec. 30, 2016

Study the blog:

https://codereview.stackexchange.com/help/searching


Search:
Keywords:

1. views:100000..200000

Depth First Search & Breadth First Search implementation


2. views:50000..100000



Code Review - Algorithms by JavaDeveloper (Day I of 10)

Dec. 30, 2016

Introduction
Julia learns to become a good coach one day by document her own practice. Tennis coach Rob Steckley coached top ranking WTA players from ranking 50 to 20;  however, Rob was not top player himself. His best ranking was around 400 when he was 27 years old. His big advice as a coach is to learn super patient, with some humor; in other words, make WTA players laugh.

Julia may not be top players on HackerRank contests, she only can perform 10% of top players in the world. But she has the goal - maybe, she can coach players up to top 10% performers in the world. A few things she found she could do, one is to write her own coding blogs to show the journey.

She did work on coding blog, and then, she found out that she started to get bronze medal on HackerRank; and then, she writes down whatever she likes to write, tiny progress she makes, and then, she found out that a smart anonymous programmer very well-prepared, had 189 algorithm with nice code, also reviewed on stackexchange.com.

Let us read some timeline facts. Julia started to write coding blog from June 2016, and found code review on stackexchange.com in Nov. 2016 Jianmin Chen (37 days), compared to JavaDeveloper (code review profile on stackexchange.com: 3 years 4 months). 3 years difference. Julia got reputation 139, 4 answers, 6 questions, ~2k people reached, visited 38 days, 38 consecutive, whereas the JavaDeveloper has 0 answers, 189 questions, ~642k people reached, member for 3 years, 4 months, 988 profile views, Last seen Dec. 19'16 at 15:29. Top 4% overall.

She has one week break from Dec. 24 - January 3, 2016. She found JavaDeveloper on stackchange.com until on Dec. 29. She plans to review 189 algorithms, but she could not finish all of them.

Weakness

Julia spent a lot of time from June 2015 to Nov, 2016 to use Google to find algorithm blogs, over 50% of them are written in Chinese. She did learn a lot of through the study; but she felt that Google search results may not lead to the best solutions out there.

Every time Julia documents the mistakes she made, she starts to learn basics. Spend time to read, write, share, and make correction. Most important is to keep her focus more on the practice.

Workout

Plan to review all the questions asked by one person - Julia searched "binary tree maximum path sum".

Around 100 algorithms.


Least Common Ancestor in Binary Tree


Or go through 189 question by votes

Julia tried so hard last few days to find good code review, she finally settles down on this one. Good job, well done!

Create a binary search tree

Check for balanced parentheses   over 40000 views







Thursday, December 29, 2016

How endurance athletes are using the power of the now

Dec. 29, 2016

How endurance athletes are using the power of the now - Ned Phillips


Secrets of elite athletes - Kenn Dickinson

Dec. 29, 2016

Secrets of elite athletes:

1. Visualize the vision
2. Deliberate practice

Penny Cheneryan American sportswoman who bred and raced Secretariat, the 1973 winner of the Triple Crown

The skill of self confidence - Dr. Ivan Joseph

Dec. 29, 2016

Spend 10 minutes to watch the "The skill of self confidence".

Director of Athletics


Julia learns something to be a good coach, very nice talk. Julia gives it 10, best one she watched today.

Self confidence - belief that you can accomplish no matter odds, adversity.

Easy way to build confidence - repetition, repetition, repetition, 10,000 hours rules.

Hey, I have done this thousand times. Over and over again, how many of us bail after we first fail.

But, practice, practice, practice, but do not accept failure.

Persistence.

Get away from the people who tear you down.

Self-affirmation - when doubt and fear come in the mind, remind himself.

What can we do? Fix mistakes. What I have done to Johnny's confidence?

What I have done to build up the confidence. Educator, catch them when they are good.

Confident people choose the feedback when they like.

No one believe in you unless you do.








Getting stuck in the negatives (and how to get unstuck)

Dec. 29, 2016

Spend 10 minutes for a talk - Getting stuck in the negatives (and how to get unstuck) 

http://psychology.ucdavis.edu/people/aml


Dr. Sean Richardson - Mental Toughness: Think Differently about your World

Dec. 29, 2016

Great talk, 10 minutes talk. That is great.

Fail over and over again, that is why I succeed. Can not take risk not to try.   Michael Jordan


http://drseanr.com/




Sport psychology - inside the mind of champoin atheletes

Dec. 29, 2016

Introduction
Came cross the video after the study of mental training for top professional tennis players.

Now, back to academical area, read something about a professor:
http://www.martinhagger.com/

Study

Take notes:

Sport psychology
  • Elite athelets recognize sport psychology
  • The study and practice of mental preparation
  • Techniques and strategies for performance
  • Dealing with stress and copy with set backs
What factors are linked to success in sport?
  • Motivation
  • Confidence
  • Performance knowledge -'total' sport
  • Routines
  • Anxiety management
Motivation

  • Goals define an athlete
  • Goal setting
          Specific, Meaningful, Agreed, Relevant, Time-specific, Engaged, Recorded

Confidence

  • Experience
  • 'Modelling'
          - Observation
          - Imagery
          - Self-talk
  •  Feedback
Imagery
  - Find quiet place
  - Imagine the race/match
  - Imagine the sensations
  - Use prompts
  - Image "what ifs"

Self-talk

  • Motivational ('come on', 'you can do this')
  • Focusing - important cues
  • Claming (e.g., 'calm';'breathe';'relax')
Anxiety management

    Relaxation techniques

  • Breathing
  • Stretching
  • Muscles
  • Music
  • Meditation







Tennis sports and study about mental part training

Dec. 29. 2016

Introduction
Continue my first study, and then start to read more.

Study

First, study the profile of Cibulkova as a professional player.

Cibulkova learned to stop her mental meltdowns

There are some important lessons to be learned here:

LESSON #1: You can only learn to manage pressure if you practice playing under pressure situations. You can’t just focus on dealing with pressure once in a while. You must commit to learning how to effectively manage pressure on a daily basis.
LESSON #2: Everyone gets nervous. You are not special in this regard and just because you have that little edginess does not meet your whole game will fall apart. Learn a good relaxation strategy that you can rely on so you can remain poised under pressure.
LESSON #3: Focus not on what just happened or what might happen… focus on what you want to happen right nowFocusing on the present requires that you have selective amnesia (so you can forget the last point) and blinders (to prevent you from looking too far ahead).

If you want no more letdowns and no more meltdowns, get to work developing your 3 point plan to manage pressure. Your game will thank you!

Actionable Items:

Read more articles:

1. top-5-emotional-players-in-womens-tennis

2. This gets a little serious - mental illness - short break strategies

3. Rebecca Marino - public sharing her mental depression, early retirement.
Slipping Through the Cracks: Pro Athletes and Mental Health:

4. Sport psychology - inside the mind of champion athletes: Martin Hagger at TEDxPerth

5. Talent players high expectations

6. Shelby Rogers a cinderella story

7. Overthinking between match points

8. http://www.articlesfactory.com/author/Dr.+Patrick+Cohn.html




Wednesday, December 28, 2016

An honest assessment from a top tennis player

Dec. 28, 2016

Introduction

Julia has a holiday break whole week, so she decides to take some time to work on something different - Mental toughness training. Learn something about dealing with worries, how to handle the stress of practice, contest and study.

She plans to do some study on professional players - tennis player, how they handle up-and-downs smartly. And then, she came cross this article to read.

Study 

Victoria Azarenka: An honest assessment of my 2015 season

First, look up her professional records on tournaments:
http://www.espn.com/tennis/player/_/id/421/victoria-azarenka

Take notes from the article, learn how healthy professional player handles down-time smartly.

1. End season early, Wuhan Open - Oct. 3, 2015 ( Oct., Nov., December) 3 months training, no matches.

Fact: 
Surprising loss in second round in Wuhan,
Work on the mental part:
1.  only thing I can do is to stay in the present, in the now, and figure out what's next.
2. There is always a new season, a new tournament, a new chance.

2. My injuries
Facts:
Play with pain in Wuhan open

Work on the injuries:
Deal with pain, play through it, train through it, pretend that it is not there.

Learned through the experience:
Learn that the hard way. Take time off.

3. Australia - start new season
Facts:
my ego came along with the nervousness

Give out an ego talk:
How it is a good thing?
You're the best and nobody can beat you.
Having a healthy ego is absolutely necessary to reach the top.

4. New coach
Facts:
Contact Serana if it is OK to work with the coach Sascha Bajin

Argument:
Being honest is the only way to do business in my opinion.

Give out  a talk about hitting partner:
...

Talk about emotional toll - inconsistencies from hard court swing to ......
father underwent surgery ...

Self-talk:
How fortunate I am to play.

Talk about training place - Croatia - a country

5. Peers
Serena - No. 1
I believe in myself and nobody can put a limit to what I can achieve.

a lot to do , a lot more to learn.

my thoughts, raw, uncut and honest. Nobody can twist and turn it around.

Actionable Item:

Do some research on emotional toll, how top-players handle emotional toll properly.
Google search keyword:
how tennis top player handles emotional toll

More readings:

1. https://www.healthychildren.org/English/health-issues/conditions/obesity/Pages/The-Emotional-Toll-of-Obesity.aspx


2.https://www.psychologytoday.com/blog/the-power-prime/201012/sports-the-power-emotions

In fact, one reason why the best athletes in the world are at the top is because they have the ability to control their emotions rather than their emotions controlling them.


HackerRank - Data Structures: Heaps

Dec. 28, 2016

Min Heap using Array 
Learn something through 10 minutes video. 
Watch the video: 
Data Structures: Solve 'Find the Running Median' Using Heaps

Data structures: Heaps 
Julia, write down the code in the above lecture video, and then use it for my own copy of C# PriorityQueue class. 

Min Heap:  

The lecture is very good, and make the explanation to mine; learn how to design those APIs:

ensureCapacity
add

heapifyDown
heapifyUp 

Watch the lecture notes twice. 

Actionable Items:

Read code review on stackexchange.com

search keyword: min heap using array
http://codereview.stackexchange.com/search?q=min+heap+using+array

Code review: HackerRank - OpenBracket codesprint - Fraudulent Activity Notification

Dec. 28, 2016

Introduction
Julia reviewed her blog:
http://juliachencoding.blogspot.ca/2016/10/fraudulent-activity-notification.html

Code Review
Read editorial notes, 

Two solution, one is counting sort, using time complexity O(n) - n is with 200 constant factor; second one use priority heap - two heaps
This can be solved using two priority queues in O(nlogn). 

Watch the video: 
 Data Structures: Solve 'Find the Running Median' Using Heaps

 Data structures: Heaps 
Julia, write down the code in the above lecture video, and then use it for my own copy of C# PriorityQueue class. 

Find some code to study:


 


HackerRank week code 27 - Hackonacci Matrix Rotations

Dec. 28, 2016

Problem statement

Score 4 - Maximum score: 40

Julia C# practice

Julia had great time to practice matrix rotations, she spent over 2+ hours to work on rotation details.

Timeout is a biggest issue. Most of top players got tip from HackerRank email to use matrix manipulation called ?.

Read editorial notes, please.

Time spent in the contest:

2+ hours

Study Google employee's code

So simple, it will take less than 20 minutes to write and read:
C++

C++

Study facebook employee code:

1. Code looks like Julia's, so Julia will study more on this implementation: Rank 40 (7000+ players)

https://www.hackerrank.com/maxvv

Java 8

Study Amazon employee's code:

Java

Important!! Study the above code, Julia, you do not need to rotate the matrix, just compare each pair of numbers:
Java Code to study

line 24 - 36.

Stanford university:

Java 7


Lesson learned:

Hackerrank sent out an email for the tip - use matrix exponentiation, top players used the tips and also if Julia checked the discussion session, top 500 players were discussing the matrix exponentiation as well. 

Julia has to pay attention to detail, go through the discussions and involve discussion as well. 

From score 4 to 40, it takes some research, and change the design of algorithm accordingly.

Follow up after 3 months


March 8, 2017
1. Read blogs written by a facebook scientist:
blogs about algorithms

   Study one scientist a time, figure out what I can learn from his experience. Ginseppe M. Mazzeo

2. Understand the algorithm, post is on code review.

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, December 26, 2016

Leetcode 15: 3 sum ( II)

Dec. 26, 2016

Problem statement:
https://leetcode.com/problems/3sum/

Review the algorithm:

Previous work:
http://juliachencoding.blogspot.ca/2016/05/leetcode-17-3-sum.html

Array.BinarySearch

Code review:
http://codereview.stackexchange.com/questions/37922/given-an-array-find-any-three-numbers-which-sum-to-zero?rq=1

The idea used in the above code review, time complexity is O(n*n*logn), time limit exceed.

Here is C# written by Julia:

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

Highlights of improvement:

1. Use Array.ToList() API;  2. Write a function PrepareKey()
https://gist.github.com/jianminchen/d17ad71a561193984e75ab4e7fb91073

2. Comment out the statement:
//int[] searchArray = nums.Skip(j + 1).ToArray();  // O(n) -> make algorithm O(n*n*n)
https://gist.github.com/jianminchen/cbc62795cc5eca621c395a7a5dc3f6bd

Two pointers technique 

Best solution is to use two pointers, therefore, time complexity is O(n*n) instead.

May, 2016
http://juliachencoding.blogspot.ca/2016/05/leetcode-17-3-sum.html

Code review and improve C# implementation on Dec. 26, 2016:
https://gist.github.com/jianminchen/9c62e27297ff94052320160b6967a61c

Stackexchange.com code review link:
http://codereview.stackexchange.com/q/150920/123986

Good news! win Best Question badge (over 10 up-votes) on stackexchange.com, gain 55 reputation on this 3 sum question. Less than 24 hours after publishing.


Two versions of code from code review:
1. From the code review:
http://codereview.stackexchange.com/a/150938/123986
C# code:
https://gist.github.com/jianminchen/dfebe273c5beca0fbbb52981f3934ded

2. From code review:
http://codereview.stackexchange.com/a/150952/123986

C# code:
https://gist.github.com/jianminchen/9ba704a49e740abad0cef99b4d760b69