| Total Complexity | 1 |
| Complexity/F | 1 |
| Lines of Code | 16 |
| Function Count | 1 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | const NGE = require('./index.js'); |
||
| 2 | // put your tests here |
||
| 3 | test('test NGE using stack', () => { |
||
| 4 | expect(NGE([4, 5, 2, 25])).toEqual({ |
||
| 5 | 4: 5, |
||
| 6 | 5: 25, |
||
| 7 | 2: 25, |
||
| 8 | 25: -1 |
||
| 9 | }); |
||
| 10 | expect(NGE([13, 7, 6, 12])).toEqual({ |
||
| 11 | 13: -1, |
||
| 12 | 7: 12, |
||
| 13 | 6: 12, |
||
| 14 | 12: -1 |
||
| 15 | }) |
||
| 16 | }); |