Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 1
    You need to know the performance of the underlying algorithms of the functions you're using. Commented Dec 8, 2013 at 11:42
  • For the recursive approach you need to know how a certain recurrence relation maps to the cost. See A Short Tutorial on Recurrence Relations for a longer explanation. Commented Dec 8, 2013 at 11:46
  • 1
    @MichaelT Alan Perlis, epigraphs on programming. But refers to lisp programmers (not to the language), presumably implying these programmers don't care about performance. At least in strict functional languages (such as virtually every Lisp), deriving time bounds is no harder than in imperative languages. Commented Dec 8, 2013 at 12:20
  • You can check this post discussing functional programming solution mentioning that's heavy : stackoverflow.com/questions/4101924/… Commented Dec 8, 2013 at 16:48