首页 > > 详细

ECE 522讲解、辅导Python,Java程序

ECE 522 | Software Construction, Verification and Evolution
Assignment 4: Lifetimes in Rust
Linked List
A linked list is a linear data structure in which each element is a separate object. Every element in the list
consists of two items:
- The data of this element.
- A reference to the next node.
The last node has a reference to an empty node. The entry point into a linked list is called the head of
the list. It should be noted that head is not a separate node, but the reference to the first node. If the list
is empty, then the head is an empty list.
A linked list is a dynamic data structure. The number of nodes in a list is not fixed and can grow and
shrink on demand. Any application has to deal with an unknown number of objects within a linked list.
Source code: linked_list.zip
Question 1: Given the following implementation of a linked list in main.rs in the attached source code:
pub enum LinkedList{
Tail,
Head(T,Box

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!