News for hackers. Stuff that matters.

jacksontale

Edited the post and added your comment
Good thought, and also if k < N / 2
This blog post is about using OCaml to solve the Pearl No. 4 in the book of "Pearls of Functional Algorithm Design, by Richard Bird".

I am very keen to OCaml and so using OCaml to solve various algorithm problems to have some fun.

Sorry for the confusion. You are absolutely right. I just copy/paste the original problem statement in the book.

Will change

Re:Visualize Randomness in OCaml on Wednesday November 25, 2015 @06:44AM (#10626706)
But anyway, I updated teh post, so people could be aware of this diff.
Re:Visualize Randomness in OCaml on Wednesday November 25, 2015 @06:44AM (#10626701)
ah ok, thanks.
Re:Visualize Randomness in OCaml on Tuesday November 24, 2015 @05:21AM (#10620033)
Re:Visualize Randomness in OCaml on Monday November 23, 2015 @02:39AM (#10613323)
Can I know why?
Re:Generating Permutations on Wednesday May 06, 2015 @04:27AM (#9497237)
Yeah, factoradic is awesome.
Re:Binomial Heap in OCaml on Thursday March 19, 2015 @04:27PM (#9234389)
I think its SML in the book
Re:Binomial Heap in OCaml on Wednesday March 18, 2015 @05:27PM (#9228811)
Yeah that book is one of the most important book in functional world
Re:Functional Pearl No.2 – The Max Number of Surpassers on Tuesday February 24, 2015 @04:07AM (#9099508)
Yeah, you are right, the example number list in the post was not that awesome. If I am free at any time, i will modify the example. Just refining the diagram will be quite painful.
Re:Functional Pearl No.2 – The Max Number of Surpassers on Tuesday February 24, 2015 @04:06AM (#9099505)
Yeah, I formally introduced the book when I presented the pearl 1: http://typeocaml.com/2015/02/02/functional-pearl-no-1-the-mi...
Re:Functional Pearl 1 – The Min Missing Natural Number on Sunday February 22, 2015 @07:32AM (#9089167)
Hi, I was using pure functional programming style, so list only.
Re:Functional Pearl 1 – The Min Missing Natural Number on Friday February 13, 2015 @04:08AM (#9043510)
Yeah, you are right, I should have mentioned that.