hiukim's blog

By hiukim, 10 years ago, In English

I think most of us can agree that reading other people's submissions is a very good way to learn. Sometimes, I found that it might be even more effective to read a correct submission than editorial in order to understand the solutions. However, selecting a good submission to read could be difficult, especially when there are a lot of accepted ones.

To solve this problem, I think we can gather everyone's wisdom. My idea is that: whenever you read a solution and found it well written in the sense that it's easy to understand, then you just vote it up. At the end of the day, good submissions will stand out, and later on, people will know which submissions to read efficiently.

To try it out, I've developed a simple application which allow you to "Like" a submission. It is similar to the status page of a contest, containing the list of accepted submissions for a particular problem, but with a few extra features. Here is a sample contest URL: http://hiukim.com/cfsubmissions/contest.php?contestId=442. And here you can find other contests (I have currently crawled only 3 latest contests): http://hiukim.com/cfsubmissions/index.php

I think the community can benefit as a whole if we could collaborate in selecting good submissions. It might as well be a good way to encourage code readability. Any comments and suggestions are welcome. I hope we could try it out in the coming contest.

Full text and comments »

  • Vote: I like it
  • +125
  • Vote: I do not like it

By hiukim, 10 years ago, In English

So I'm studying the failure function from this topcoder tutorial: http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=stringSearching

and it said "given a string (a quite long one), find all its proper suffixes that are also prefixes of it. All we have to do is just to calculate the "failure function" of the given string and using the information stored in it to print the answer."

I couldn't figure out how I can do that with the failure function. Can anyone give some ideas?

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it