Data Structures CS3334

1 Overview
In this individual project, you are required to explore different methods (at least three) to find out all unique elements in a given list of numbers.
It is not allowed to use any C++ STL containers (e.g., std::vector, std::set, std::map, and others) .
2 Detailed Requirements
In this project, you are asked to implement and compare different methods of finding out all unique elements in a given list of numbers. In particular, you need to provide at least three (i.e., 3) different methods and compare their performance with time complexity analysis.
For example, to find all unique elements in the list { 7 , 4 , 5 , 9 , 5 , 8 , 3 , 3 } , you can try using array based brute force approach or binary search tree to find out the targeted output { 7 , 4 , 9 , 8 } . Hints: may think about how to find out the duplicates at first.
In your submitted report, you need to explicitly explain:
the algorithms and data structures of the methods you have tried;
the time complexity of each method (mainly the worst-case time complexity);
Note that you are NOT required to provide formal time complexity analysis, but some intuitive or informal discussion.
Experimental Evaluations
In this project, you may design and generate some test data for each method so that you can evaluate and compare the differences in efficiency among different methods over different generated inputs. Figures that intuitively show how the input data affects the selection among different methods are appreciated but optional. Note that, the compiling command for compiling your programs (written in C++) should be clearly stated in the report. Some available compiling options are -std=c++11, -lm, -O2.
If you cannot pass the OJ test cases , the maximum marks you can get is 30. If your codes containing the direct usage of C++ STL containers for one of the methods, you will get 0 mark in this project.
3 OJ Input and Output
You can check the similar material in Question 897 on the OJ system.
Input
The input contains multiple test cases. For each test case, it contains a line of integers (the number of integers is less than 104 while each integer is ( 10 5 , 10 5 )).
Output
Each line of the output is a list of all unique elements. The order of the output elements follows the order in the original input.
4 Due Date and Submission
The project is due at 23:59 on Apr 25, 2024 .
Test your solutions by submitting your codes to the Online Judge system (Question 897).
Submit a zip file (size 5MB) onto Canvas, containing all your materials, i.e., 1) codes (including all codes submitted to the OJ), 2) the screenshots of all passes from different methods, and 3) the final report.
  • 23
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值