Skip to content

Instantly share code, notes, and snippets.

@alexhawkins
alexhawkins / searchAlgos.js
Last active September 4, 2016 09:46
Binary Search Algorithms with Shuffle and Range
/*
#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.
@rain1024
rain1024 / graph.md
Last active October 4, 2015 00:25
algorithm

Graph Search Algorithm

Shortest Path Problem [1]

image

Algorithms

  • 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.
@allenwb
allenwb / 0Option2ConstructorSummary.md
Last active November 4, 2023 14:39
New ES6 constructor features and semantics: Alternative 2 manual super in derived classes

New ES6 Constructor Semantics and Usage Examples

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.

@rochoa
rochoa / algorithms.js_vs_native_sort.md
Last active August 29, 2015 14:05
native sort vs algorithms quicksort in different node versions

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.
@zxhfighter
zxhfighter / interview.txt
Last active February 3, 2018 20:33
interview
【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.)
@staltz
staltz / introrx.md
Last active June 18, 2024 06:15
The introduction to Reactive Programming you've been missing
@santanuchakrabarti
santanuchakrabarti / RE_to_Grammar_Algorithm.md
Last active December 5, 2021 21:12
An algorithm to generate a Regular Grammar from a Regular Expression
@ndelage
ndelage / interview_prep.md
Last active May 7, 2018 00:59
Interview Prep Questions

Process

  • Phone
  • Tech
    • Pairing
    • Whiteboarding
  • Culture

What should you get out of the interview process?

@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active June 12, 2024 03:08
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

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!






\

@listochkin
listochkin / node-command-line-options.txt
Created April 17, 2014 11:00
Node V8 GC-related options
--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