Data Structures and Algorithms with Object-Oriented Design Patterns in Ruby
next up previous index

Projects

  1. Write a Ruby method that takes a single integer argument n and has a worst-case running time of O(n).
  2. Write a Ruby method that takes a single integer argument n and has a worst-case running time of tex2html_wrap_inline57831.
  3. Write a Ruby method that takes two integer arguments n and k and has a worst-case running time of tex2html_wrap_inline59535.
  4. Write a Ruby method that takes a single integer argument n and has a worst-case running time of tex2html_wrap_inline58549.
  5. Write a Ruby method that takes a single integer argument n and has a worst-case running time of tex2html_wrap_inline58555.
  6. Write a Ruby method that takes a single integer argument n and has a worst-case running time of tex2html_wrap_inline58565.
  7. The generalized Fibonacci numbers of order tex2html_wrap_inline59549 are given by

    equation2467

    Write both recursive and non-recursive methods that compute tex2html_wrap_inline59551. Measure the running times of your algorithms for various values of k and n.


next up previous index

Bruno Copyright © 2004 by Bruno R. Preiss, P.Eng. All rights reserved.