The main goal of this library is to prove that Flux can be implemented in a way compatible with full hot reloading (and explore how this can be done). You can run the example code with npm start, change action creators or stores, and the new logic will kick in before you refresh.
This file contains 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
const longestSubarrayLength = (arr, k) => { | |
let longestLength = 0; | |
for (let i = 0; i < arr.length; i++) { | |
let currentSum = 0; | |
let currentCount = 0; | |
let currentSlice = arr.slice(i); | |
console.log('currentslice: ', currentSlice); | |
// for current slice, add values as long as sum is <= k | |
for (let j = 0; j < currentSlice.length; j++) { | |
if (currentSum + currentSlice[j] <= k) { |