Tags: %TAGME{ tpaction="" web="Main" tag="" }% view all tags

LeetCode Exercise 1

Moodle Link

Due September 1, 11:55pm

The goal of this course is to gain experience with developing and testing Algorithms in the LeetCode environment.

Two person teams will be assigned for this assignment. You should work together collaboratively, but should each turn in a solution to Moodle.

Assignment

Attempt to solve 344, Counting Bits

  • 40% for working solution
  • +5% for solutions that have O(n) space complexity (include an analysis that justifies this)
  • +5% for solutions that have O(n) runtime complexity (include an analysis that justifies this)
Attempt to solve 349. Intersection of Two Arrays
  • 40% for working solution
  • +5% for solution with O(nlogn) runtime complexity
  • +10% for solution with O(n) runtime complexity
O(n) complexity will be covered in detail later, but for now consider that it means:
  1. For space complexity it means that the amount of memory used is increases linearly with the size of n (number passed to the program).
  2. For time complexity it (basically) means that (dominate) number of iterations used to compute a solution increases linearly with the size of n

Turn in:

  1. Source code for your solution
  2. Samples runs showing the operation with input and outputs.
  3. Explanations for your complexity analysis
Be prepared to discuss you solutions in class.

-- TWiki Admin User - 2016-08-14

Comments


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