CS 36CWinter 2024 Homework 3

CS 36CWinter 2024 Homework 3:
SkipList and Sorting
This project has you writing an implementation of a SkipList (to do a key/value data store),
mergesort on linked lists, and quicksort on arrays. This assignment is due on Tuesday February
6th at 1400 PST (6:00 pm Davis time). You must work on this assignment individually. We have
provided you with a rich skeleton project in Homework3.zip available from Canvas which
includes a full Gradle and IntelliJ environment.
This time the Skeleton project actually includes all the tests used for grading, as a sufficient
number of students submitted photos for Cat Break.
Expected Project Outcomes

  1. Implement the major functionality of a SkipList, including the iterator (which produces
    pairs), setting, and getting elements.
  2. Implement mergesort for a LinkedList
  3. Implement quicksort for arrays
    Implementation and Grading
    You should implement the specified function in the three Kotlin files. These are:
  4. SkipListCell.makeNextArray(): Array<SkipListCell<K, V>?>
  5. SkipListIterator.computeNext(): Unit
  6. SkipList.set(): Unit
  7. SkipList.getNode(): SkipListCell<K, V>
  8. SkipList.contains(element: ): Boolean
  9. LinkedList.split(start: LinkedListCell) :
    Pair<LinkedListCell,LinkedListCell>
  10. LinkedList.mergeSortWith(comp: Comparator) : LinkedList
  11. Array.quickSortWith( comp: Comparator) : Array
    For grading on Gradescope you will submit SkipList.ks, LinkedList.ks, and
    ArraySorter.ks files.
    Wehave provided you with the comprehensive test suite used for grading, but you may add
    further tests if you desire and are encouraged to do so.
    The SkipList basic operations (insertion, fetching, and checking) should be O(log(n)) and the
    two sorts should be O(n log(n)) in all cases (in the case of QuickSort this means no pathological
    cases that are O(n2)). The test cases include the performance evaluation necessary.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值