Code Monkey home page Code Monkey logo

cs1.3's Introduction

CS 1.3: Core Data Structures & Algorithms

Course Description

This course explores the foundations of computer science including discrete mathematics, abstract data types, data structures, and algorithm analysis and design. Students will compare and contrast iterative and recursive algorithms to analyze design and performance tradeoffs. Students will apply and test data structures like lists, stacks, queues, sets, maps, and trees in real-world problems such as phone call routing. Students will also write technical blog articles about these topics in order to deepen their understanding and gain valuable online presence as knowledgeable and proficient software engineers.

Why you should know this

Data structures are the building blocks of computer science. It's the foundation that allows engineers to store and manipulate data. Once you have a place to store the data, if you need to find data or sort it in a specific way, you'll need search algorithms in order to do that.

Implementations of these concepts are how some of the largest tech companies in the world were built. Displaying relevant search results and finding friends and peers on social networks would be impossible without these core concepts. They're also the most common topics for software engineering interviews, and leveling up your knowledge on these topics is required to nail that technical interview!

Prerequisites:

Learning Outcomes

Students by the end of the course will be able to ...

  1. Compare and contrast iterative and recursive algorithms
  2. Analyze the complexity of an algorithm to determine its runtime
  3. Implement various data structures such as stacks, queues, sets, maps, and trees
  4. Implement iterative and recursive sorting algorithms
  5. Build out different types of tree traversals
  6. Practice writing technical articles

Schedule

Course Dates: Wednesday, May 29 – Wednesday, July 3, 2019 (6 weeks)

Class Times: Monday & Wednesday at 3:30–5:20pm (11 class sessions)

Class Date Review of Prior Topic New Topic & Challenges
1 Wed, May 29 Number Bases
2 Mon, June 3 Number Bases Review Recursion & Search Algorithms
3 Wed, June 5 Search Algorithms Review String Algorithms
4 Mon, June 10 String Algorithms Review Arrays & Linked Lists
5 Wed, June 12 Linked Lists Review Lists, Stacks & Queues
6 Mon, June 17 Stacks & Queues Review Maps & Hash Tables
7 Wed, June 19 Maps & Hash Tables Review Trees & Binary Search Trees
8 Mon, June 24 Binary Search Trees Review Tree Traversals
9 Wed, June 26 Tree Traversals Review Sets & Circular Buffers
10 Mon, July 1 Sets Review Technical Article Peer Review
11 Wed, July 3 Word Jumble Challenge

Repository Setup Instructions

Please follow these instructions exactly to set up your fork of this repository.

Class Assignments

Projects

Evaluation

To pass this course you must meet the following requirements:

  • Complete all required tutorials
  • Pass all projects according to the associated project rubric
  • Pass the final summative assessment >=75%
  • Actively participate in class and abide by the attendance policy
  • Make up all classwork from all absences

Make School Course Policies

cs1.3's People

Contributors

aespaldi avatar avery246813579 avatar dalnk avatar ibirnam avatar neptunius avatar olyve avatar

Watchers

 avatar  avatar

cs1.3's Issues

Feedback on Hash Tables

Good work on this, Ki! Your code is passing all tests.

This is not required, but you might consider going back through this class and adding time/space complexity annotations for the remaining methods. Not only will this be a good review, but it will also help deepen your knowledge of how hash tables work.

Also, there were some places where you left TODOs despite completing the work. You might want to clean those up. If you have Pylint installed you might have noticed that it gets upset when you have unused variables. On lines 40 and 50, you can replace these unused iterating variables with underscores to improve how your code reads.

Feedback: Linked Lists, Stacks & Queues

  • Your linked list looks good. There is a typo in replace that causes a bug, so I recommend fixing that. In replace, you check if the old item is not found twice, but the first time on lines 163 and 164 is unnecessary because the while loop right below it won't even start if the head is None, so the error will be raised below it. Another thing you could refactor is calling append in insert at index rather than having the corresponding code reimplemented in insert at index.
  • Your stacks and queues look good as well. I like your heavy usage of class methods for simple, but readable code.

Feedback on Sets

Good work on your sets implementation. Your is_subset implementation is backwards. You are supposed to test if self is a subset of the other passed in set.

Your tests are well organized into the two classes. However, I'm not sure if the to_array function is necessary. I can see what its is doing, but I would also argue that you could just restrict the user's inputs as opposed to performing so many linear cleanup operations. I would be interested to chat with you sometime to understand why you added this.

Feedback on Palindromes and String Searching Algorithms

Your code is passing all tests, which is a good thing! I do have some suggestions which can help your to refactor and improve your code.

Both of your palindromes algorithms are very nested. Instead of having your initial while condition in the iterative approach, you could think about using your success or failure condition as the while condition.

Also, your recursive function is implemented with the exact same structure as the recursive one and doesn't take advantage of the benefits of recursion, like writing less code.

I thought it was clever to break your strings logic into helper functions, but you didn't take advantage of your initial functions to avoid duplication. You also did not add any unit tests to your strings.py or annotate the time and space complexities.

Feedback: Trees & Tree Traversals

  • Your binary tree runs well for the most part. Your _find_node_iterative needs some fixing. If you try and run it in your search method (replace its recursive counterpart), you will see it fails tests. First, check to make sure your syntax is correct, one of the if statements looks off.
  • You will then see an error about strings and how they don't have a left or right property. Are you correctly traversing the nodes?

Feedback: Number Bases & Search Algorithms

  • Nice work on you number base functions. I would've liked to have seen some comments that explain what some of the lines of code were doing as if I had wasn't familiar with number base conversion (what is the process inside your functions and why is it like that?).
  • Your binary search functions look fine as well, but it is possible to have a binary search function without checking the left and right items.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.