Tag Archives: sort

Competitive programming in Haskell: sorting tree shapes

In my previous post I challenged you to solve this problem, which essentially asks how many distinct binary tree shapes are created when we take lists of numbers and build a tree from each by repeated binary search tree insertion. … Continue reading

Posted in competitive programming, haskell | Tagged , , , , , , , | 19 Comments


Thanks for the responses to my previous post about finding roots of polynomials; I now have some new avenues to explore. But today I want to write about something completely different. I recently stumbled across this fun paper by Miguel … Continue reading

Posted in haskell, humor, math | Tagged , , , , , | 10 Comments

Counting inversions with monoidal sparks

Time for me to reveal the example I had in mind that led to the generalization in my previous post. Thanks for all the interesting comments: it seems like there are some interesting connections to be explored (e.g. to the … Continue reading

Posted in math | Tagged , , , , , , , , | 8 Comments