Day3. Start Algorithm
This commit is contained in:
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace _724._Find_Pivot_Index;
|
||||
namespace _724._Find_Pivot_Index;
|
||||
|
||||
public class Solution
|
||||
{
|
||||
@@ -12,7 +6,7 @@ public class Solution
|
||||
{
|
||||
int[] sumsFromLeft = new int[nums.Length];
|
||||
int[] sumsFromRight = new int[nums.Length];
|
||||
for(int i = 1; i < nums.Length; i++)
|
||||
for (int i = 1; i < nums.Length; i++)
|
||||
sumsFromLeft[i] = nums[i - 1] + sumsFromLeft[i - 1];
|
||||
|
||||
for (int i = nums.Length - 2; i >= 0; i--)
|
||||
|
||||
Reference in New Issue
Block a user