Skip to content

Instantly share code, notes, and snippets.

View muthukumarse's full-sized avatar

Muthukumar Selvarasu muthukumarse

View GitHub Profile
@gaearon
gaearon / CurvedArrow.js
Last active October 26, 2021 14:14
Curved SVG arrow between two objects (rects or circles) https://twitter.com/dan_abramov/status/1362255543721672704
// from/to: { left, top, width, height, shape: 'circle' | 'rect' }
function CurvedArrow({ from, to }) {
function curvedHorizontal(x1, y1, x2, y2) {
function pos(t) {
let mx = x1 + (x2 - x1) / 2;
let p1 = {x: x1, y: y1};
let p2 = {x: mx, y: y1};
let p3 = {x: mx, y: y2};
let p4 = {x: x2, y: y2};
return {
@BretCameron
BretCameron / LinkedList.js
Created September 30, 2019 09:16
The full LinkedList implementation from this tutorial: https://bit.ly/2mihZac
class LinkedListNode {
constructor(value, next) {
this.value = value;
this.next = next || null;
}
}
class LinkedList {
constructor(value) {
this.size = 0;