LeetCode Exercise 3

Due Feb 18, 9:00am

Moodle Link

You are to work individually on this assignment.

For your solution on problem 1 you should do an analysis of your solution, and justify the following:

  1. O((n))
  2. Ω((n))
  3. Θ((n))
Try to guess the runtime on #2, but you don't need a full analysis.

Assignment

  • Do both problems, analysis your solutions for each
  • Turn in full source code
Problem 1

Solve 80. Remove Duplicates from Sorted Array II

  • 25% for solution that functions correctly
  • 25% for complete asymptotic analysis
  • (50% maximum)
Problem 2

Solve 100. Same Tree

  • 25% for solution that functions correctly
  • 25% for complete asymptotic analysis
  • (50% maximum)
Turn in:
  1. Source code for your solution
  2. Samples runs showing the operation with input and outputs.
  3. A complete asymptotic analysis (for #1)
Be prepared to discuss you solutions in class.

-- TWiki Admin User - 2016-08-14

Comments


Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 2019-02-23 - JimSkon
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback