Dijkstra's
algorithm solves the single-source shortest path problem.Bellman–Ford
algorithm solves the single-source problem if edge weights may be negative.A*
search algorithm solves for single pair shortest path using heuristics to try to speed up the search.Floyd–Warshall
algorithm solves all pairs shortest paths.
/* | |
#DATA STRUCTURES & ALGORITHMS | |
A) Binary Search with RANGE and Shuffle algorithms: | |
-Algorithmic Steps | |
1) If needle == value in haystack, we're done. Exit. | |
2) If needle < middle value in haystack, go left. Go to step 1. |
Manual super: Alternative Design where subclass constructors do not automatically call superclass constructors
This Gist presents a new design of class-based object construction in ES6 that does not require use of the two-phase @@create protocol.
One of the characteristics of this proposal is that subclass constructors must explicitly super invoke their superclass's constructor if they wish to use the base class' object allocation and initialization logic.
An alternative version of this design automatically invokes the base constructor in most situations.
Check the conversation here https://twitter.com/felipernb/status/499661739244281859
As Felipe mentions native sort covers many edge cases so native method is less performant. However I get totally different results using node.js in different versions, check results_node_* files.
Some edge cases, see tests.js file:
- Sorting
[1, null]
produces different result in native than in algorithms.js. ['a', null, 'a']
produces inconsistent results in algorithms.js.
【General Questions】 | |
1. What did you learn yesterday/this week? | |
2. What excites or interests you about coding? | |
3. What UI, Security, Performance, SEO, Maintainability or Technology considerations do you make while building a web application or site? | |
4. Talk about your preferred development environment. (OS, Editor, Browsers, Tools etc.) |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
My algorithm to convert a Regular Expression to a Regular Grammar is based on mostly two online resources.
Other similar online resources on the same topic may be found at:
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
--log_gc (Log heap samples on garbage collection for the hp2ps tool.) | |
type: bool default: false | |
--expose_gc (expose gc extension) | |
type: bool default: false | |
--max_new_space_size (max size of the new generation (in kBytes)) | |
type: int default: 0 | |
--max_old_space_size (max size of the old generation (in Mbytes)) | |
type: int default: 0 | |
--max_executable_size (max size of executable memory (in Mbytes)) | |
type: int default: 0 |