This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class LinkedListNode { | |
| constructor(value, next) { | |
| this.value = value; | |
| this.next = next || null; | |
| } | |
| } | |
| class LinkedList { | |
| constructor(value) { | |
| this.size = 0; |