代写二叉查找树程序作业、代写BST 作业、代写Data Structures

代写二叉查找树程序作业、代写BST 作业、代写Data Structures
KIT205 Data Structures and Algorithms
Assignment 1: Data Structures
Due: 27th April, 11:55pm
Introduction
You work for an education company that develops and runs Massive Open Online Courses
(MOOCs). You have been asked to develop some software to manage student enrolments.
You decide to develop a prototype solution to test the performance of different data
structures and algorithms.
The company will initially only offer a few courses, but that may expand significantly in the
future. More importantly, each course may have many thousands of students – perhaps even
hundreds of thousands. Your software needs to provide the following functions:
1. Add a student
2. Remove a student
3. Enrol student in a course
4. Un-enrol student from a course
5. Print a summary of courses and the number of students enrolled in each course
6. Print an ordered list of students enrolled in a course
7. Print a list of courses that a given student is enrolled in
The number of courses that any student will enrol in is small. Furthermore, there is no
inherent order to the courses, so an ordered data structure is not required. Therefore you
decide to use a simple linked list to store the courses for each student.
The number of students will potentially be very large and, for quick access, sorted data is
required. Initially, you decide to test performance of a binary search tree to store the
students, but you would like to test an AVL tree as well. Note that, for this preliminary testing,
only the student ids will be stored (as long ints).
Assignment Specification – Part A (80%)
For this part of the assignment you will implement a prototype that uses BST to store
students, with each student record containing a list of courses the student is enrolled in. You
must use the BST and linked list code developed in the tutorials, however the data structures
will be modified for the new data (and functions will also require minor modifications to
accommodate these changes). The following definitions MUST be used:
typedef struct listNode{
char *data;
struct listNode *next;
} *ListNodePtr;
typedef struct list {
ListNodePtr head;
} List;
typedef struct bstNode {
long data;
List courses;
struct bstNode *left;
struct bstNode *right;
} *BSTNodePtr;
typedef struct bst {
BSTNodePtr root;
} BST;
The ListNodePtr and List definitions and (modified) linked list functions must be placed in
files stringlist.h and stringlist.c. The BSTNodePtr and BST definitions and
(modified) BST functions must be placed in files bst.h and bst.c.
All remaining code should be placed in a file called main.c that contains the main function
and program logic. This file will contain separate functions for each of the seven operations
listed in the introduction, as well as an eighth function to handle termination. Other functions
may be added if required.
Program I/O
All interactions with the program will be via the console. Operations 1-7 will be selected by
typing 1-7 at the command prompt. Quitting the application will be selected by typing 0. For
example, the following input sequence would add a student with id 123456, enrol that student
in course “abc123”, and then quit the application:
1
123456
3
123456
abc123
0
Note that this sequence shows the input only, not the program response (if any). You are free
to add prompts to make the application more user friendly, but this will not be assessed
(although it may be useful).
Program output in response to operations 5-7, should be as minimal as possible. You may
print a header if you wish, but this should be followed by one record per line with spaces
separating data. For example, in response to operation 5, the output might be:
Current enrolments:
abc123 32
def456 0
123def 10236
I/O Restrictions
You may assume that all input will always be in the correct format and contain no logical
errors.
? Commands will always be in the range 0-7
? Course names will always be strings less than 100 characters long and may contain any
alpha-numeric characters excluding spaces
? Student ids will always be positive integers in the range 0-999999
? The user will never attempt to add a student to a non-existent course
? The user will never attempt to print data for a non-existent course
? The user will never attempt to print data for a non-existent student
Note: Students that are enrolled in courses may be removed, in which case the course data for
that student should also be removed
Memory Management
Course names should be stored in appropriately size dynamically allocated memory. Names
will always be less than 100 characters long. For example, the course name “abc123” would
be stored in a char string of length 7.
Removing (un-enrolling) a student or removing a course should free all associated dynamically
allocated memory. Removing a course should free all memory for the enrolled students as
well as the course. The quit function should also free all dynamically allocated memory.
Assignment Specification – Part B (20%)
This part of the assignment should only be attempted once you have a fully implemented and
thoroughly tested solution to part A. It would be better to submit a complete part A and no
part B than to submit a partially complete part A and part B.
The requirements for this part of the assignment are exactly the same as for part A except that
an AVL tree must be used to store students, rather than storing them in a BST. The AVL files
should be named avl.h and avl.c. The AVL node definition should be a modified version of
the BST node.
Minimal assistance will be provided for this part of the assignment, especially if you cannot
demonstrate a fully implemented and thoroughly tested solution to part A.
Testing
It can be very time consuming to thoroughly test a program like this when all input is done
manually (imagine testing that your solution can manage 10000 students). A common method
of testing code like this is to use input redirection (and possibly output redirection). When
using input redirection your code runs without modification, but all input comes from a file
instead of from the keyboard.
This facility is provided in Visual Studio through the project properties dialog. For example, to
redirect input from a file called “test.txt”, you would add:
<"$(ProjectDir)test.txt"
to Configuration Properties|Debugging|Command Arguments. This will be demonstrated in
tutorials.
At least one small input test file with sample output will be provided. It is recommended that
you construct larger files to fully test your program.
Assignment Submission
Assignments will be submitted via MyLO (an Assignment 1 dropbox will be created). You
should use the following procedure to prepare your submission:
? Make sure that your project has been thoroughly tested using the School’s lab
computers
? Choose “Clean Solution” from the “Build” menu in Visual Studio. This step is very
important as it ensures that the version that the marker runs will be the same as the
version that you believe the marker is running.
? Quit Visual Studio and zip your entire project folder along with a completed
assignment cover sheet
? Upload a copy of the zip file to the MyLO dropbox
History tells us that mistakes frequently happen when following this process, so you should
then:
? Unzip the folder to a new location
? Open the project and confirm that it still compiles and runs as expected
o If not, repeat the process from the start
KIT205 Data Structures and Algorithms: Assignment 1 - Data Structures
Synopsis of the task and its context
This is an individual assignment making up 10% of the overall unit assessment. The assessment criteria for this task are:
1. Implement basic functionality for a console-base application
2. Implement and test a linked list to store courses
3. Implement and test a BST to store students
4. Implement and test an AVL tree to store students
A significant and extremely important part of software development is thorough testing. Small programming errors may attract a large penalty if the error is something
that should have been picked up in testing! Please try to complete your program early to leave enough time for testing.
Match between learning outcomes and criteria for the task:
Unit learning outcomes
On successful completion of this unit you will be able to … Task criteria:
1. Transform a real world problem into a simple abstract form that is suitable for computation
2. Implement common data structures and algorithms using a common programming language
3. Analyse the theoretical and practical run time and space complexity of computer code in order to select algorithms for
specific tasks
4. Use common algorithm design strategies to develop new algorithms when there are no pre-existing solutions
5. Create diagrams to reason and communicate about data structures and algorithms
http://www.6daixie.com/contents/13/1348.html

我们的方向领域:window编程 数值算法 AI人工智能 金融统计 计量分析 大数据 网络编程 WEB编程 通讯编程 游戏编程多媒体linux 外挂编程 程序API图像处理 嵌入式/单片机 数据库编程 控制台 进程与线程 网络安全  汇编语言 硬件编程 软件设计 工程标准规等。其中代写代做编程语言或工具包括但不限于以下范围:

C/C++/C#代写

Java代写

IT代写

Python代写

辅导编程作业

Matlab代写

Haskell代写

Processing代写

Linux环境搭建

Rust代写

Data Structure Assginment 数据结构代写

MIPS代写

Machine Learning 作业 代写

Oracle/SQL/PostgreSQL/Pig 数据库代写/代做/辅导

Web开发、网站开发、网站作业

ASP.NET网站开发

Finance Insurace Statistics统计、回归、迭代

Prolog代写

Computer Computational method代做

因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:[email protected]

微信:codinghelp

原文地址:https://www.cnblogs.com/rrrrrrrrr/p/8974685.html

时间: 2024-10-25 14:46:27

代写二叉查找树程序作业、代写BST 作业、代写Data Structures的相关文章

代写Servlet、代写JSP、代写JavaBean程序作业

代写Servlet.代写JSP.代写JavaBean程序作业Servlet+JSP+JavaBean模式适合开发复杂的web应用,在这种模式下,Servlet负责处理用户请求,JSP负责数据收集和显示,JavaBean封装数据操作的相关功能.请以Servlet+JSP+JavaBean模式开发新闻发布系统,主要包括用户添加.用户登录.用户信息修改.新闻发表.新闻修改和新闻查看功能.具体要求如下:1.完成数据库设计,要求记录管理员信息和新闻信息,其中管理员信息包括:用户名.密码.性别.QQ号.em

网络爬虫作业代码代写代实现、代做爬虫程序

网络爬虫作业代码代写代实现.代做爬虫程序任务二.网络爬虫实现 一.任务描述编写大学排名爬虫程序,从"最好大学网"获取"软科中国最好大学排名"2016.2017.2018年的国内大学排名数据,并将它们输出出来.2016年中国最好大学排名网址目的1.学习运用requests库编写基本URL访问过程2.学习运用beautifulsoup4库解析和处理HTML3.掌握编写网络爬虫的基本方法二.任务分析(必须有,主要分析任务需求,完成任务的思路与方法,采用的技术等,如爬虫的任

金融衍生工具课程作业代写、代写套期保值程序作业、代写正态性检验

金融衍生工具课程作业代写.代写套期保值程序作业.代写正态性检验这个作业要求交两个文件,一个Excel文件,一个word文档.文本主要用来解释每个题目是怎么做的 (一)数据搜集与整理(10)1在yahoo finance上下载S&P500从2016年1月2日至2016年12月31日的日数据 (daily data) .我们取Adj Close作为我们的数据 2 处理数据:把S&P500的第一个数据调整成100,其他的数据调整成相对价格,即:我们得到数据 从此我们把St看成我们的原始数据,并依

代写DNN程序作业、代作DNN的资源分配框架

代写DNN程序作业.代作DNN的资源分配框架我们提出了一种基于DNN的资源分配框架,来优化CRN的性能,而不管CRN的EE如何.它由三层组成,即输入层,多个隐藏层和输出层.输入是具有连续概率密度函数的瞬时信道功率增益 . 和 ,输出是 或 ,隐藏层和输出层的激活函数是ReLU,即 ,其中 和 分别表示神经单元的输入和输出,后面给出了网络结构的详细参数,为了获得每个神经元的权重,需要对DNN进行训练,训练数据通过[6]提出的传统资源分配策略或[5]给出的节能资源分配策略获得,瞬时信道功率增益 .

代写java binary search trees|代写Java Data Structures CS作业|代写Java作业|Java 编程作业代写|Java作业代写

CS2230 Computer Science II: Data Structures Homework 7 Implementing Sets with binary search trees 30 points Goals for this assignment ? Learn about the implementation of Sets using binary search trees, both unbalanced and balanced ? Implement methods

C++作业代写、代写C++求最小划分子集 编程作业

C++作业代写.代写C++求最小划分子集 编程作业题目:求最小划分子集划分子集问题 问题描述:已知集合A={a1,a2,--an},及集合上的关系R={ (ai,aj) | ai,aj∈A, i≠j},其中(ai,aj)表示ai与aj间存在冲突关系.要求将A划分成互不相交的子集A1,A2,--Ak,(k≤n),使任何子集中的元素均无冲突关系,同时要求分子集个数尽可能少.测试数据:元素集合A={1,2,3,4,5,6,7,8,9}冲突关系集合R={ (2,8), (9,4), (2,9), (2,

代写java程序qq:928900200

学校为全面提升学校教学质量,提高管理水平,决定开发一套小型成绩管理系统,实现以下功能.1)   系统用户分为管理员.教师和学生三种角色,每种角色都可以包含若干个用户.其中管理员登录后可以进行教师.学生和课程管理.2)   系统能够管理教师,进行增加,删除,编辑,查询.教师包含教师号.姓名.学院.职称.年龄等信息.3)   系统能够管理学生,进行增加,删除,编辑,查询.学生包含学号.姓名.学院.专业.班级等信息.4)   系统能够管理课程,进行增加,删除,编辑,查询.课程包含课程号.名称.任课教师

JAVA-集合作业-已知有十六支男子足球队参加2008 北京奥运会。写一个程序,把这16 支球队随机分为4 个组。采用List集合和随机数

第二题 已知有十六支男子足球队参加2008 北京奥运会.写一个程序,把这16 支球队随机分为4 个组.采用List集合和随机数 2008 北京奥运会男足参赛国家: 科特迪瓦,阿根廷,澳大利亚,塞尔维亚,荷兰,尼日利亚.日本,美国,中国,新西 兰,巴西,比利时,韩国,喀麦隆,洪都拉斯,意大利 package Test03; import java.util.ArrayList; import java.util.List; import java.util.Random; public class

hadoop-初学者写map-reduce程序中容易出现的问题 3

1.写hadoop的map-reduce程序之前所必须知道的基础知识: 1)hadoop map-reduce的自带的数据类型: Hadoop提供了如下内容的数据类型,这些数据类型都实现了WritableComparable接口,以便用这些类型定义的数据可以被序列化进行网络传输和文件存储,以及进行大小比较.(如果是自定义的key,value的数据类型,必须也要写其大小比较的方法) BooleanWritable:标准布尔型数值 ByteWritable:单字节数值 DoubleWritable: