Find Jobs
Hire Freelancers

IMPLEMENTING AN ORDERED LIST WITH A BINARY SEARCH TREE

$10-30 USD

완료함
게시됨 약 5년 전

$10-30 USD

제출할때 지불됩니다
TITLE IMPLEMENTING AN ORDERED LIST WITH A BINARY SEARCH TREE INTRODUCTION An ordered list is a sequence of elements, all of the same type, that is ordered by the elements' values. A binary search tree (BST) is a binary tree in which the value at each node is greater than the values in its left subtree and less than the values in its right subtree. This project implements an ordered list using a BST and exercises that list in a menu-driven program. DESCRIPTION Design, write, test, and document a class that implements an ordered list type, and a program that exercises the class's list implementation. Implement the ordered list type using a pointer-based binary search tree. The elements of the class's lists are integers, but it should be easy to change this type. The class should implement the following operations on ordered lists of its element type: Initialize a list to be empty (the default constructor). A destructor that deletes the dynamic memory in the tree that represents a list. Re-initialize an existing list to be empty. Insert a value into a list, in the appropriate position. If the value is already present, the list is unchanged. Remove a value from a list. If the value is not present, the list is unchanged. Return the length of a list: the number of values it contains. Report whether or not a particular value is present in a list. Write out the values in a list, in order, to an output stream. The exercising program should be menu-driven and interactive. The program will read and respond to commands that the user enters, as illustrated in the example below. INPUT The program will read commands to manipulate one list. These commands will consist of a letter followed sometimes by an integer. For example, the command "i 25" might tell the program to insert the value 25 into the list. OUTPUT The program will write to the terminal instructions and a menu of commands, and it will prompt for the user's input. ERRORS The program may assume that the input the user provides is correct; it need not detect any errors. EXAMPLE A run of the program might look something like this: This program responds to commands the user enters to manipulate an ordered list of integers, which is initially empty. In the following commands, v is any integer. e -- Re-initialize the list to be empty. i v -- Insert the value v into the list. r v -- Remove the value v from the list. l -- Report the length of the list. p v -- Is the value v present in the list? w -- Write out the list. h -- See this menu. q -- Quit. --> i 27 --> i 42 --> i 15 --> i 33 --> i 14 --> w The list 0: 14 15 27 33 42 --> r 33 --> w The list: 14 15 27 42 --> p 22 The value 22 is NOT present in the list. --> p 42 The value 42 is present in the list. --> i 88 --> i 51 --> l The list contains 6 values. --> q This example does not illustrate everything the program might do under all circumstances; it is your responsibility to test all its features. OTHER REQUIREMENTS Use a typedef statement to specify the item type in the class's list type, so that the item type can be changed easily. HINTS Commands will consist of a letter sometimes followed by an integer. These can be easily read in with the extractor operator ">>". Consider whether functions associated with the class should be member functions, friend functions, or nonmember functions.
프로젝트 ID: 19339146

프로젝트 정보

4 제안서
원격근무 프로젝트
활동 중 5년 전

돈을 좀 벌 생각이십니까?

프리랜서 입찰의 이점

예산 및 기간 설정
작업 결과에 대한 급여 수급
제안의 개요를 자세히 쓰세요
무료로 프로젝트에 신청하고 입찰할 수 있습니다
프로젝트를 수여된 사용자:
사용자 아바타
hi Sir i'm professional elecreical engineer ill program your code for free after that if you like my work you can pay . 100 percent money back garntuee looking forward for your reply thanks
$15 USD 1일에
0.0 (0 건의 리뷰)
0.0
0.0
4 이 프로젝트에 프리랜서들의 평균 입찰은 $29 USD입니다.
사용자 아바타
Hi, I have over 10 years of experience in C++ programming. I've read the description. I can finish this task in 1 day. Please message me if you're interested.
$50 USD 1일에
4.9 (83 건의 리뷰)
6.0
6.0
사용자 아바타
I can do this project. I have experience of Python, C & C++ and Java programming for 5+ years. I can satisfy you perfectly. Please contact me and discuss in detail.
$25 USD 1일에
5.0 (3 건의 리뷰)
2.6
2.6

고객에 대한 정보

국기 (UNITED STATES)
Saint Cloud, United States
5.0
2
결제 수단 확인
4월 22, 2019부터 회원입니다

고객 확인

감사합니다! 무료 크레딧을 신청할 수 있는 링크를 이메일로 보내드렸습니다.
이메일을 보내는 동안 문제가 발생했습니다. 다시 시도해 주세요.
등록 사용자 전체 등록 건수(일자리)
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
미리 보기 화면을 준비 중...
위치 정보 관련 접근권이 허용되었습니다.
고객님의 로그인 세션이 만료되어, 자동으로 로그아웃 처리가 되었습니다. 다시 로그인하여 주십시오.