andyttran / guide_to_algorithms Goto Github PK
View Code? Open in Web Editor NEWA guide to get started in algorithms
License: MIT License
A guide to get started in algorithms
License: MIT License
The link that is provided for the cheat sheet has a typo.
In the solution to Problem Set 1 (the very last line of the README) it says:
- 300n^5 + 15002^n + 3n // O(n^5)
However doesn't the 15002^n term dominate (similarly to how 2^n dominates n^2)?
hello,
for loop
var cars =[
{'toyota' : 'corolla', 'honda' : 'civic'},
{'toyota' : 'corolla1', 'honda' : 'civic1'},
{'toyota' : 'corolla2', 'honda' : 'civic2'},
{'toyota' : 'corolla3', 'honda' : 'civic3'},
];
var names = []; //names = 1, [] = 1
for(var i=0; i< cars.length; i++) { // for = 1 , var i = 1, =0 = 1, < = 1, cars.length = 1, i++ = 1
names.push(cars[i].toyota); //names = 1, push = 1, cars[i] = 1, toyota = 1
}
console.log(names); has an array access and then a printing to the console, so thats 2 operations
total = 14
map method js
var cars =[
{'toyota' : 'corolla', 'honda' : 'civic'},
{'toyota' : 'corolla1', 'honda' : 'civic1'},
{'toyota' : 'corolla2', 'honda' : 'civic2'},
{'toyota' : 'corolla3', 'honda' : 'civic3'},
];
var mapValues = cars.map(function(animal){ //mapvalues = 1, cars = 1, map= 1, function= 1
return animal.toyota; //return = 1, animal = 1, toyota = 1
});
console.log(mapValues); // has an array access and then a printing to the console, so thats 2 operations
total = 9
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.