Skip to content

Instantly share code, notes, and snippets.

@ManojSatishkumar
ManojSatishkumar / Big O notations.txt
Created February 24, 2021 16:30
Here are some for sorting algorithms
# Big O | Sorting
# Bubble Sort
TC -> O(N^2)
SC -> O(1)
# Insertion Sort
TC -> O(N^2)
SC -> O(1)
@ManojSatishkumar
ManojSatishkumar / Hard binding.js
Created February 24, 2021 16:31
An example explicit hard binding in javascript
// Explicit hard binding.
// Let's bind the calling function to the Function's prototype itself
if (!Function.prototype.bind2) {
Function.prototype.bind2 = function (o, args) {
return () => {
this.apply(o, [args]);
}
}
}
{
"Name": "Hello"
}
{
"Key": "Value"
}