added documentation, js standard style and jest testing to kadane algorithm file.

This commit is contained in:
Abhijeet Tiwari
2021-10-06 14:45:07 +05:30
parent 2e6f8ae982
commit 3a8e336262
2 changed files with 29 additions and 6 deletions

View File

@ -0,0 +1,8 @@
const fc = require('../kadaneAlgo')
test('test1', () => {
expect(fc.kadaneAlgo([1, 2, 3, 4, 5])).toBe(15)
})
test('test2', () => {
expect(fc.kadaneAlgo([-1, -2, -3, -4, 5])).toBe(5)
})