diff --git a/assets/images/module6/week2/finishedInsertAtEnd.png b/assets/images/module6/week2/finishedInsertAtEnd.png new file mode 100644 index 0000000..bb1ef80 Binary files /dev/null and b/assets/images/module6/week2/finishedInsertAtEnd.png differ diff --git a/module6/index.md b/module6/index.md index b79d8b9..bcfc97a 100644 --- a/module6/index.md +++ b/module6/index.md @@ -27,7 +27,8 @@ In Module 6, students will begin to dive into the skills and mindsets necessary * [Job Hunt Hustle Intro](./lessons/Week1/JobHuntHustle) * [Asking Questions in an Interview](./lessons/Week1/AskingQuestionsInAnInterview) * [Tools For After An Interview](./lessons/Week1/ToolsForAfterAnInterview) +* [Intro to CS](./cstopics) ### Week 2 * [Revisiting the Graceful Exit](./lessons/Week2/RevisitingTheGracefulExit) -* [Intro to CS](./cstopics) \ No newline at end of file +* [Linked Lists - CS Topic - Data Structure](./lessons/Week2/LinkedLists) diff --git a/module6/lessons/Week2/LinkedLists.md b/module6/lessons/Week2/LinkedLists.md new file mode 100644 index 0000000..4d68b4a --- /dev/null +++ b/module6/lessons/Week2/LinkedLists.md @@ -0,0 +1,53 @@ +--- +layout: page +title: Linked Lists - CS Topic - Data Structure +--- + +## Introduction + +Today's lesson on the linked list data structure comes to you in three parts. + +**Part 1**: Independent research + +**Part 2**: Class walkthrough of key operations and time complexity + +**Part 3**: Diving into a C# implementation of a linked list + +### Independent Learning +Start by taking 20 minutes to independently research the Linked List Data Structure. + +I recommend that you start by reading [this](https://medium.com/basecs/whats-a-linked-list-anyway-part-1-d8b7e6508b9d) article. + +As you're researching, look for the answers to the following questions. + +1. What does it mean for a data structure to be linear? +2. What is the difference between a linked list and an array? What about with regards to how they are stored in memory? +3. In the code implementation, you will have a Node class and a LinkedList class. What properties do you think these two classes will have? + +### Group Walk Through +Let's walk through a couple of some key operations you might do with a linked list. After we walk through the operation a couple of times, I will call on someone to try and explain the big O time complexity of this operation. + + + +### Code Implementation + +You will have 15 minutes to work on [this code](https://replit.com/@Zoe-Farrell/LinkedLists). + +The InsertAtBeginning method is working, but to get the InsertAtEnd method working you will need to fill in some code. Complete the TODO by replacing the underlines with code. + +
+### Finished InsertAtEnd + + +
+ +Have one partner share their screen, and work together to get InsertAtEnd working! + +If you have extra time, you can take a look at [this REPL](https://replit.com/@Zoe-Farrell/LinkedListsMoreMethods) that includes more common linked list methods and try to determine the BigO of each operation. You can check your work with the table in the `Summary` section on [this](https://www.codingninjas.com/studio/library/time-and-space-complexity-of-linear-data-structures) page. \ No newline at end of file