Saturday, March 5, 2011

In how many ways can 2 sorted arrays of combined size N be merged?

meaning n+m = N

1 comment:

  1. It should be N!/n!m!: N! gives you the # of orderings of N elements.
    Then we correct taking into account that the two arrays are already sorted.

    ReplyDelete