(hex)
| 21 | }; |
| 22 | |
| 23 | const hexToUtf8Byte = (hex) => { |
| 24 | const strippedHex = hex.replace(/<0x|>/g, ""); |
| 25 | return parseInt(strippedHex, 16); |
| 26 | }; |
| 27 | |
| 28 | class PriorityQueue { |
| 29 | // PriorityQueue implementation is copied from https://stackoverflow.com/a/42919752 with minor refactoring |