Better HN
topnewbestaskshowjobs
Log inSign up

jacksontale

128 karma · joined Feb 13, 2015 (11y ago) · 25 submissions

Submissions

comment 9y ago · link · parent

Edited the post and added your comment

comment 9y ago · link · parent

Good thought, and also if k < N / 2

comment 9y ago · link · parent

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.

comment 9y ago · link · parent

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

Will change

5.

Pearl No. 4 – Kth Smallest in the Union of Two Sorted Collections(typeocaml.com ↗)

61 points · by jacksontale · 9y ago · 16 comments

comment 11y ago · link · parent

But anyway, I updated teh post, so people could be aware of this diff.

comment 11y ago · link · parent

ah ok, thanks.

comment 11y ago · link · parent

Just tried, but seems not that different

----------------

PNG:

https://raw.githubusercontent.com/MassD/typeocaml_code/maste...

-------------

JPG:

https://raw.githubusercontent.com/MassD/typeocaml_code/maste...

comment 11y ago · link · parent

Can I know why?

10.

Visualize Randomness in OCaml(typeocaml.com ↗)

14 points · by jacksontale · 11y ago · 8 comments

comment 11y ago · link · parent

Yeah, factoradic is awesome.

12.

Generating Permutations(typeocaml.com ↗)

5 points · by jacksontale · 11y ago · 3 comments

13.

Functional Pearl No.3 – Saddleback Search(typeocaml.com ↗)

10 points · by jacksontale · 11y ago · discuss

comment 11y ago · link · parent

I think its SML in the book

comment 11y ago · link · parent

Yeah that book is one of the most important book in functional world

16.

Binomial Heap in OCaml(typeocaml.com ↗)

78 points · by jacksontale · 11y ago · 13 comments

17.

Functional Heap – Leftist Tree(typeocaml.com ↗)

9 points · by jacksontale · 11y ago · discuss

comment 11y ago · link · parent

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.

comment 11y ago · link · parent

Yeah, I formally introduced the book when I presented the pearl 1: http://typeocaml.com/2015/02/02/functional-pearl-no-1-the-mi...

20.

Recursive Memoize and Untying the Recursive Knot(typeocaml.com ↗)

1 points · by jacksontale · 11y ago · discuss

21.

Functional Pearl No.2 – The Max Number of Surpassers(typeocaml.com ↗)

22 points · by jacksontale · 11y ago · 8 comments

comment 11y ago · link · parent

Hi, I was using pure functional programming style, so list only.

23.

Functional Pearl No.2 – The Max Number of Surpassers(typeocaml.com ↗)

3 points · by jacksontale · 11y ago · discuss

24.

Recursive Memoize and Untying the Recursive Knot(typeocaml.com ↗)

1 points · by jacksontale · 11y ago · discuss

comment 11y ago · link · parent

Yeah, you are right, I should have mentioned that.