{"id":19041595,"url":"https://github.com/mikeizbicki/cmc-csci046","last_synced_at":"2025-05-16T08:03:32.965Z","repository":{"id":44705697,"uuid":"222377183","full_name":"mikeizbicki/cmc-csci046","owner":"mikeizbicki","description":"CMC's Data Structures and Algorithms Course Materials","archived":false,"fork":false,"pushed_at":"2025-01-23T22:53:45.000Z","size":14832,"stargazers_count":49,"open_issues_count":53,"forks_count":153,"subscribers_count":46,"default_branch":"2023spring","last_synced_at":"2025-05-09T15:15:28.903Z","etag":null,"topics":["cmc","computer-science","course","data-science","python3"],"latest_commit_sha":null,"homepage":"","language":"TeX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mikeizbicki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-18T06:20:38.000Z","updated_at":"2025-04-22T03:15:05.000Z","dependencies_parsed_at":"2024-11-08T22:30:04.934Z","dependency_job_id":"ae58e6fa-c5d2-48d2-9dbf-0ddff6af6c0a","html_url":"https://github.com/mikeizbicki/cmc-csci046","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeizbicki%2Fcmc-csci046","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeizbicki%2Fcmc-csci046/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeizbicki%2Fcmc-csci046/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeizbicki%2Fcmc-csci046/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikeizbicki","download_url":"https://codeload.github.com/mikeizbicki/cmc-csci046/tar.gz/refs/heads/2023spring","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254493381,"owners_count":22080126,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmc","computer-science","course","data-science","python3"],"created_at":"2024-11-08T22:29:56.855Z","updated_at":"2025-05-16T08:03:32.944Z","avatar_url":"https://github.com/mikeizbicki.png","language":"TeX","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CSCI046: Data Structures and Algorithms\n\n\u003c!-- created on github --\u003e\n\n[![](smbc.png)](https://www.smbc-comics.com/comic/hansel-and-gretel)\n\n## About the Instructor\n\n|||\n|---------------|-------------------------------|\n| Name          | Mike Izbicki (call me Mike)   |\n| Email         | mizbicki@cmc.edu              |\n| Office        | Adams 216                     |\n| Office Hours  | See [Issue #416](https://github.com/mikeizbicki/cmc-csci046/issues/416) |\n| Zoom          | See [Issue #325](https://github.com/mikeizbicki/cmc-csci046/issues/325) |\n| Webpage       | [izbicki.me](https://izbicki.me) |\n| Research      | Machine Learning (see [izbicki.me/research.html](https://izbicki.me/research.html) for some past projects) |\n\nFun facts:\n1. grew up in San Clemente (~1hr south of Claremont, on the beach)\n1. 7 years in the navy\n    1. nuclear submarine officer, personally converted \u003e10g of uranium into pure energy\n    1. worked at National Security Agency (NSA)\n    1. left Navy as a [conscientious objector](https://www.nytimes.com/2011/02/23/nyregion/23objector.html)\n1. phd/postdoc at UC Riverside\n1. taught in [DPRK (i.e. North Korea)](https://pust.co)\n1. my wife is pregnant and due to have a baby April 18th\n    1. I will take 2 weeks off for paternity leave when the baby comes\n\n## About the Course\n\n\u003ccenter\u003e\n\u003cimg width=100% src=map_of_cs.png /\u003e\n\u003c/center\u003e\n\nData structures is the most important course in computer science,\nand many of the \"classic\" CS interview questions come from this course.\nMastering this material is the first step towards getting a high-paying CS job.\nSee:\n1. Salaries: \u003chttps://www.levels.fyi\u003e\n1. Benefits: \u003chttps://www.levels.fyi/benefits/Paternity-Leave/\u003e\n1. [This is despite tech employers illegally colluding to reduce salaries](https://en.wikipedia.org/wiki/High-Tech_Employee_Antitrust_Litigation)\n\n**Who should take this course?**\n\n1. This is a second-semester course in computer science designed for students who have previously taken either CS40 (CMC), CS5 (Mudd), or CS51 (Pomona).\n\n1. You cannot take this course if:\n    1. you have already taken a data structures course\n       (e.g. Pomona: CS62; HMC: CS60, CS70), or\n    1. you are a CS major through Mudd or Pomona.\n\n1. This course is required for CMC's **data science major** and the computer science sequence.\n   It is optional for the data science sequence.\n\n**Learning Objectives:**\n\n1. Learn the basics of\n    1. linux terminal \n    1. git\n    1. open source software\n\n1. Be able to answer the following three questions about an algorithm:\n    1. Is it correct?\n    1. How much resources does it consume? (time, memory, money, etc.)\n    1. Can we do better?\n\n\u003c!--\nSecondary objectives:\n\n1. More experience with python programming\n1. Solve the questions asked in programming interviews and contests\n1. Introduction to the hacker culture\n\nDifferences between this course and HMC's CSCI060HM/CSCI070HM:\n\n1. This course does not cover low-level memory management (C/C++ programming languages)\n1. This course is more practical\n--\u003e\n\nThis course is NOT an algorithms course.\nAlgorithms courses form the \"other half\" of classic CS interview questions,\nand you should consider taking [CS148 - Graph Algorithms](https://catalog.claremontmckenna.edu/preview_course_nopop.php?catoid=25\u0026coid=31723) after this course.\n\n**Textbook:**\n\nAll of our textbooks are both [free as in beer](https://en.wiktionary.org/wiki/free_as_in_beer) and [free as in speech](https://en.wiktionary.org/wiki/free_as_in_speech):\n\n1. [Problem Solving with Algorithms and Data Structures using Python](https://runestone.academy/runestone/books/published/pythonds/index.html) by Brad Miller and David Ranum\n\n1. [Official Python Documentation](https://docs.python.org/)\n\n**Grades:**\n\nYour grade will be composed of:\n\n1. Weekly labs (worth `2**1` points)\n1. Weekly quizzes (worth `2**2` or `2**3` or `2**4` points)\n1. Weekly projects (worth `2**3` or `2**4` or `2**5` points)\n1. No exams!!!\n    1. Non-graduating students will complete a final project due during finals week.\n1. [Occasional extra credit assignments](extra_credit/README.md)\n\nHistorically, the average student needs to spend about 10 hours per week (outside of class) to get an A.\n   About 25% of students will either:\n   spend 15-20 hours per week and get an A,\n   or spend 10 hours per week and get a B/C.\n\n**Late Work Policy:**\n\nYou lose `2**i` points on every assignment,\nwhere `i` is the number of days late minus 1.\n\n\u003e **Example:**\n\u003e Homeworks will be due on Tuesdays, so if you submit on Wednesday then `i=0` and you receive a `2**0` (i.e. `1`) point penalty.\n\u003e If you submit on Friday, you receive a `2**2` (i.e. 4) point penalty.\n\nIt is usually better to submit a correct assignment late than an incorrect one on time.\n\nI expect that most students will be submit late assignments at some point.\n\n**Grade Schedule:**\n\nYour final grade will be computed according to the following table,\nwith one caveat.\n\n| If your grade satisfies          | then you earn |\n| -------------------------------- | ------------- |\n| 95 \u0026le; grade                    | A             |\n| 90 \u0026le; grade \u003c 95               | A-            |\n| 87 \u0026le; grade \u003c 90               | B+            |\n| 83 \u0026le; grade \u003c 87               | B             |\n| 80 \u0026le; grade \u003c 83               | B-            |\n| 77 \u0026le; grade \u003c 80               | C+            |\n| 73 \u0026le; grade \u003c 77               | C             |\n| 70 \u0026le; grade \u003c 73               | C-            |\n| 67 \u0026le; grade \u003c 70               | D+            |\n| 63 \u0026le; grade \u003c 67               | D             |\n| 60 \u0026le; grade \u003c 63               | D-            |\n| 60 \u003e grade                       | F             |\n\n**Caveats:**\n\nThere are 2 \"caveat tasks\" in this course.\nThese tasks should be easy, and everyone will get full credit on the task just for completing the task.\nIf you don't complete one of the tasks, however, your grade (from the table above) will be docked 10%.\n(For example, an A- grade would become a B- grade.) \nYou have the entire semester (until I submit grades) to complete these tasks.\n\nYou can find the details about the caveat tasks at:\n1. [caveat_tasks/typespeed.md](caveat_tasks/typespeed.md)\n1. [caveat_tasks/culture.md](caveat_tasks/culture.md)\n\n## Academic Integrity\n\n**Technology Policy:**\n\n1. You MUST complete all programming assignments on the lambda server.\n\n1. You MUST use either vim or emacs to complete all programming assignments.\n   In particular, you may not use the GitHub text editor, VSCode, IDLE, or PyCharm for any reason.\n\n   In particular: You MAY NOT use the GitHub interface to edit files for a pull request.\n\n1. You MAY NOT share your lambda server credentials with anyone else.\n\nViolations of any of these policies will be treated as academic integrity violations.\n\n**Collaboration Policy**\n\n1. There are no restrictions on what you can post to GitHub Issues.\n    In particular, you are highly encouraged to post detailed questions/answers/comments with lots of code.\n\n1. You are highly encouraged to collaborate with students\n\n    1. in class/lab,\n\n    1. in the QCL,\n\n    1. and in office hours.\n\n1. You MAY NOT look at another student's code (or have another human look at your code) in any other context.\n\n1. You MAY NOT look at another student's code on github.\n\n    All projects are developed as open source projects,\n    and so the code is published openly online.\n    The benefits of this model include:\n    (1) you actually learn how to develop/contribute to open source projects;\n    (2) future employers see you have github activity.\n    Please do not abuse this privilege.\n\n## Accommodations Policy\n\nI've tried to design the course to be as accessible as possible for people with disabilities.\n(We'll talk a bit about how to design accessible software in class too!)\nIf you need any further accommodations, please ask.\n\nI want you to succeed, and I'll make every effort to ensure that you can.\n\n\u003c!--\n\nNext class should cover:\n\nbig pdf assignment:\n    and/or short circuiting\n    del lines[i] vs remove\n\nword_ladder assignment:\n    open the file\n    del lines[i]\n\nbig-oh:\n    big-o of the word ladder with set vs list\n    memory usage O(1) vs O(n) vs O(n^2)\n    accidentally quadratic\n\ntwitter: \n    sys.exit() and bash $?\n    use the cowsay and fortune as an example for piping\n\n\nin the sorting assignment, the _merge function is a dependency of quick_sorted();\npassing the test cases for _merge guarantees that the function works,\nbut you can still get errors inside the function if you have errors outside the functiton\n\nlab processes:\n\n1. add discussion of how the HUP signal is sent differently for different OSes\n2. limitted number of processes on the lambda server, show the fork resource exhausted error\n3. killall/kill $(...) to kill processes\n4. fork bomb\n5. debug map.py by looking inside the nohup.out file\n6. (un)buffered io, stdout vs stderr, redirection applies only to stdout\n\nNo `nohup.out` file in the repo.\n\nintroduce superclasses/static methods before the week on BSTs; it's too much to do it all at once; consider doing the deque class\n\nShould probably do doubly linked list as Deque before doing BSTs\n\nDemo something like the insert function in class; it's difficult for students to do the recursive inserts that modify the node values\n\nShould add an insert/remove_min function to the BST/AVLTree class? as an analogy to the heap\n\nClarify which trees should have duplicates/no duplicates\n\nAdd tests to BST/AVLTree/Heap for runtime of operations\n\n--\u003e\n\u003c!--\nSee:\nhttp://nifty.stanford.edu/2020/schwarz-recursion-to-the-rescue/\nhttp://nifty.stanford.edu/2020/denero-typing-test/spec.html\n--\u003e\n\n\u003c!--\n1. [Yes, the median salary at facebook is $240k](https://www.sfchronicle.com/business/networth/article/Yes-median-pay-at-Facebook-really-is-about-12870786.php)\n1. [A detailed analysis of FAANG salaries](https://huyenchip.com/2020/01/18/tech-workers-19k-compensation-details.html), with raw data from [levels.fyi](https://www.levels.fyi/SE/Amazon/Google/Facebook/#)\n1. [The high-tech employee antitrust litigation](https://en.wikipedia.org/wiki/High-Tech_Employee_Antitrust_Litigation)\n1. [Get jobs from GitHub/HackerNews](https://news.ycombinator.com/item?id=22050802)\n1. [/r/cscareerquestions](https://www.reddit.com/r/cscareerquestions/top/)\n\nOther technical articles:\n\n1. [Command-line tools can be faster than a hadoop cluster](https://news.ycombinator.com/item?id=22188877)\n1. [intermediate vim](https://dn.ht/intermediate-vim/)\n1. [Mike's dotfiles](https://github.com/mikeizbicki/dotfiles)\n1. [The missing semester of CS education](https://news.ycombinator.com/item?id=22226380)\n1. [Larry Wall's three virtures of a programmer](http://threevirtues.com/)\n1. [accidentally quadratic blog](https://accidentallyquadratic.tumblr.com/post/161243900944/mercurial-changegroup-application) and a [windows bug caused by an O(n^2) algorithm](https://news.ycombinator.com/item?id=21743424)\n1. [the history of git](https://www.welcometothejungle.com/en/articles/btc-history-git)\n1. [timsort](https://svn.python.org/projects/python/trunk/Objects/listsort.txt) - Tim's [Zen of Python](http://www.openbookproject.net/books/bpp4awd/_static/ch10/zen.html)\n1. [stackoverflow - why processing sorted arrays is faster even in linear search](https://stackoverflow.com/questions/11227809/why-is-processing-a-sorted-array-faster-than-processing-an-unsorted-array)\n\n1. [What every programmer should know about floating-point](https://floating-point-gui.de/)\n1. [The lat/lon floating point delusion](https://www.datafix.com.au/BASHing/2019-08-09.html)\n1. [The fallacy of premature optimization](https://ubiquity.acm.org/article.cfm?id=1513451)\n1. [Computer Science from the Bottom Up](https://www.bottomupcs.com/index.xhtml)\n\n1. https://choosealicense.com/\n\nLibrary documentation:\n\n1. [timeit](https://docs.python.org/3/library/timeit.html)\n1. [collections](https://docs.python.org/3/library/collections.html)\n1. [copy](https://docs.python.org/3/library/copy.html)\n1. [traceback](https://docs.python.org/3/library/traceback.html)\n\nProgramming games:\n\n1. https://vim-adventures.com/\n1. The [git game](https://github.com/git-game/git-game) and [git game v2](https://github.com/git-game/git-game-v2)\n1. `typespeed` (type this command on the lambda server)\n1. [bandit wargames](https://overthewire.org/wargames/bandit/bandit0.html)\n--\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeizbicki%2Fcmc-csci046","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikeizbicki%2Fcmc-csci046","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeizbicki%2Fcmc-csci046/lists"}