Showing posts with label Radix Sort. Show all posts
Showing posts with label Radix Sort. Show all posts

Thursday, December 15, 2016

Radix Sort - Code Review

Dec. 15, 2016

Introduction


Review the radix sort - in C#, a blog written in May, 2016.

Since last workout Julia took 4 hours to understand the algorithm, Julia likes to do warmup in short future; design the algorithm better for easy to understand, and then, post the algorithm on stackexchange.com code review.

Will come back very soon.

Come back on Dec. 16:

Julia came cross one question related to radix sort, and she decided to make learning more meaningful, planned to answer the question.

Code review - first teacher badge


Julia made it happen to choose a most popular post view 10,000 views, she got one up-vote by answering the question. 

After she got first teacher badge on stackexchange.com, and she tries to get second approval for answering the "radix sort" one in JavaScript.  

Julia used to be a teaching assistant in Florida Atlantic University when she worked on computer science Ph.D. program. 

Radix sort in Javascript


To answer the current question, Julia took close to 2 hours to work on the code. She learned a few things. 

Time spent: 3+ hours

Actionable Items:


No response on code review, so Julia will continue to study the radix sort, and continue to improve the answer until she gets one up-vote. 


Read  more radix sort on code review. 

Favorite ones:
1. Radix sort question in C

2. Radix sort

3. Radix sort in C#

4. Read more about this talent - My JavaScript teacher

Favorite answer

5. Julia found another JavaScript teacher







Sunday, May 22, 2016

Radix Sort - a distribution sort

May 22, 2016

Read the blog, have some code using C# in short future:


C# practice based on the above blog:
comment: Line 47, change array name from int[] count -> int[] position, but still get confused; This variable does more than one task. 
https://gist.github.com/jianminchen/ba73ca1550b88eae99c1617c1636180d
Make some changes:
Change the array's name to helper, helper serves three functions (line 47): 
1. First, get count for each digit
2. Second, add sum from 0 to up 
3. Third, decrease one by one to track index of next available position for i. 
comment: Line 47, change array name to helper, and add comment to list tasks for helper. Feel more control, there is a term called "express the intent." 
https://gist.github.com/jianminchen/09f12e539fce1b267e75d808e13c4ff6
Prepare for Leetcode 164: Maximum Gap 

Tuesday, June 9, 2015

leetcode 164: Maximum Gap - a Distribution sort (bucket, counting, radix) algorithm

Here is the leetcode link I am reading in the morning on April 4, 2015.
And then, find out myself to read this article from the following links, try to find readable explanation about the algorithms related to distribution sort algorithms.

May 22, 2016   (30 minutes at least)
Review the solution on this blog:


Read blogs talking about algorithm first, 

Distribution Sort - 分布排序
Radix Sort - 基数排序

Actionable Items:
Spend 4 hours + work on code implementation, Java, C++ -> C# code.