联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> Python编程Python编程

日期:2018-10-15 10:28

CS3353

Programming assignment

1. Implement insertion and deletion for a Splay tree as defined in class.

Note that insertion should check for duplicate keys, and when there is no such key after exhausting the input in case of deletion, display “the key does not exist.”

Input:

list of pairs of an integer and an operation, e.g., 1.in 3.in 5.in 3.del 2.in …..

/* Notice that pairs are delimited by a single space in between. Note that input is to be read in from a file in a batch. */

Output:

The tree before operation in in-order traversal and the tree in an in-order traversal after operation displayed on the screen standard outout (not into a file).

If a duplicate key is inserted display “duplicate key”, and reject it.

Any other way different then note it in the README file.


A command line user interface has to be provided as follows:

“Enter your input file name:”

“Display the tree before (in-order):” /* display the input integers following a statement */

“Display the tree after the operation (in-order):” /* display the resulting output on the screen */

*Provide a README file with specific instructions for compilation and execution for the grader to follow, and any notes you want to add such as how you handle “overflow”, etc.


版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp