Rust Linked List Implementation

# Introduction In this lab, we have an implementation of a linked-list using `enums` in Rust. The `List` enum has two variants: `Cons`, which represents a node with an element and a pointer to the next node, and `Nil`, which signifies the end of the linked list. The enum has methods such as `new` to create an empty list, `prepend` to add an element at the front of the list, `len` to return the length of the list, and `stringify` to return a string representation of the list. The provided main function demonstrates the usage of these methods to create and manipulate a linked list. > **Note:** If the lab does not specify a file name, you can use any file name you want. For example, you can use `main.rs`, compile and run it with `rustc main.rs && ./main`.

|60 : 00

Click the virtual machine below to start practicing