CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 06:15:51 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=e2b52ae6bc5a79ab8508cfa67cd0bcb866df2af484b11eaf65051d762856fc54a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22NRPijLeEOj7TboWyRS2O-sNqowNaNVRL%22%3B%7D; HttpOnly; Path=/
cf-ray: 98cc39b06bdab277-BLR
06. Equal Sums - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve(array) {
- function equalSum(array) {
- if(array.length===1){
- return 0;
- }
- let right_sum = 0;
- let left_sum = 0;
- for (let i = 1; i < array.length; i++) {
- right_sum += array[i];
- }
- for (let i = 0, j = 1; j < array.length; i++, j++) {
- right_sum -= array[j];
- left_sum += array[i];
- if (left_sum === right_sum) {
- return i+1;
- }
- }
- return "no";
- }
- console.log(equalSum(array));
- }
Advertisement
Add Comment
Please, Sign In to add comment
-
⭐✅ MAKE $2500 IN 15 MIN⭐⭐⭐ O
JavaScript | 7 sec ago | 0.24 KB
-
⭐⭐⭐ G2A Payment Exploit ✅ NEVER SEEN BEFORE ⭐...
JavaScript | 9 sec ago | 0.24 KB
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ 8
JavaScript | 18 sec ago | 0.24 KB
-
⭐✅ MAKE $2500 IN 15 MIN ✅ NEVER SEEN BEFORE ⭐...
JavaScript | 18 sec ago | 0.24 KB
-
⭐ ✅ Free Products Method ✅ ✅ NEVER SEEN BEFOR...
JavaScript | 27 sec ago | 0.24 KB
-
Free Crypto Method (NEVER SEEN BEFORE)⭐⭐ C
JavaScript | 29 sec ago | 0.24 KB
-
⭐ G2A Bug ⭐ (Get more on BTC swaps) ✅ NEVER S...
JavaScript | 36 sec ago | 0.24 KB
-
⭐✅ Jack's Profit Method ✅ NEVER SEEN BEF...
JavaScript | 45 sec ago | 0.24 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand