wadefagen / coursera Goto Github PK
View Code? Open in Web Editor NEWSource Code and Starter Code for Accelerated Computer Science Fundamentals Specialization on Coursera
Home Page: https://www.coursera.org/specializations/cs-fundamentals
Source Code and Starter Code for Accelerated Computer Science Fundamentals Specialization on Coursera
Home Page: https://www.coursera.org/specializations/cs-fundamentals
Hello Professor Wade Fagen-Ulmschneider @wadefagen,
Thank you so much for your effort on this specialization. I really enjoyed the course content and I have finished the first two classes of the specialization.
I really think the slides of the course are helpful for reviewing the content, making learning more effectively.
If possible, could you upload the slides to this repo?
Thank you so much for your help!
Please group source codes by Courses.
repo
|-- Object-Oriented Data Structures in C++
| + ...
|-- Ordered Data Structure
| + ...
+- Unordered Data Structure
+ ...
Thank you.
This repository is lacking example code of the 3rd course Unordered Data Structure in the coursera specialization Accelerated Computer Science Fundamentals Specialization. If it is no longer in here, please tell me where can I find the source code of the 3rd course?
There's a dangling reference returned by Stack::removeTop
that can cause a crash if handled improperly. It's hard to detect because it still references a valid vector memory cell in many situations even after the removeTop operation. Here's an illustration of the exploit (replaces main.cpp
in the cpp-tower
example):
/**
* Simple main to create and solve a game of the Tower of Hanoi puzzle.
*
* @author
* Wade Fagen-Ulmschneider <[email protected]>
*/
#include "Game.h"
#include <iostream>
int main() {
Game g;
std::cout << "Initial game state: " << std::endl;
std::cout << g << std::endl;
g.solve();
std::cout << "Final game state: " << std::endl;
std::cout << g << std::endl;
{
// illustration of dangling reference issue in Stack::removeTop
Stack s;
Cube blue(42, uiuc::HSLAPixel::BLUE);
s.push_back(blue);
Cube& c = s.removeTop();
std::cout << "blue addy: " << &blue << std::endl;
std::cout << "c addy: " << &c << std::endl;
Cube blue2(999, uiuc::HSLAPixel::BLUE);
s.push_back(blue2);
Cube& c2 = s.removeTop();
std::cout << "blue2 addy: " << &blue2 << std::endl;
std::cout << "c2 addy: " << &c2 << std::endl;
std::cout << "We expect this to be 42 for c, but instead it's 999 as for c2:" << std::endl;
std::cout << c.getLength() << std::endl;
}
return 0;
}
The simplest fix is to have the Stack class return things by value. I might try to submit a pull request later.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.