logo Use SA10RAM to get 10%* Discount.
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Elijah YoungManagement
(5/5)

852 Answers

Hire Me
expert
Adrian ReedFinance
(5/5)

884 Answers

Hire Me
expert
Thomas BornholdtEconomics
(5/5)

526 Answers

Hire Me
expert
Vijendra Kumar yadavMathematics
(/5)

969 Answers

Hire Me
C Programming

Use C to implement serialization/marshalling/unloading/flattening of a red/black tree to a string

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

CSE 2320 Lab Assignment 4

Goals:

  1. Understanding of red-black

  2. Understanding of recursive binary tree

Requirements:

  1. Use C to implement 1) serialization/marshalling/unloading/flattening of a red/black tree to a string and 2) the inverse operation of deserializing/unmarshalling/loading/unflattening a string to a red/black tree. Both operations are based on the recursive pre-order traversal of a binary tree.

The input is 1) the number of bytes in a string (including the NULL terminator), 2) a string no longer than the indicated length corresponding to a red-black tree, 3) n, the number of keys to be inserted into the tree, and 4) the n integers to be inserted into the tree.

The output is 1) the length (including the NULL terminator) of a string corresponding to the final red- black tree (after insertions) and 2) the string corresponding to the final red-black tree.

In the serialized version of a tree, . indicates the sentinel. Each key will be immediately followed by a letter r or b indicating its color. Optionally, a key may include a sign (+ or -). Three examples follow:

  1. Submit all necessary C source files on Canvas by 10:45 am (section 004) or 1:45 pm (section 003) on November 14. Comments at the beginning of the source file should include: your name, your ID number, and the command used to compile your code on Omega (5 point penalty for non- compliance).

Getting Started:

  1. Suitable driver and header files are available at http://ranger.uta.edu/~weems/NOTES2320/LAB/LAB4FALL19/ . c is available at http://ranger.uta.edu/~weems/NOTES2320/REDBLACKC/ .

  2. You must use separate compilation. Do not merge together implementation and header

  3. The string representing a red-black tree will be free of

  4. Be sure your code does not leak memory. If you malloc() it, you are obligated to free()

  5. You should check the deserialized tree either while building it or by using verifyRBproperties().

  6. Your deserialization code should check the input string for errors. Characters past the end of a tree should result in a warning. Inappropriate characters elsewhere should result in a message and exit()

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme

Get Free Quote!

439 Experts Online