Skip to content

Commit 986cd52

Browse files
authored
Update README_EN.md
1 parent c583aaa commit 986cd52

File tree

1 file changed

+5
-1
lines changed
  • solution/1500-1599/1508.Range Sum of Sorted Subarray Sums

1 file changed

+5
-1
lines changed

solution/1500-1599/1508.Range Sum of Sorted Subarray Sums/README_EN.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ tags:
6565

6666
<!-- solution:start -->
6767

68-
### Solution 1: Brute Force
68+
### Solution 1: Sorting
69+
70+
According to the problem statement, generate the `arr` array, sort it, and then sum all the elements in the range $[left-1,.. right-1]$ to get the result.
71+
72+
Time complexity is $O(n^2 \times \log n)$, and space complexity is $O(n^2)$. Here, $n$ is the length of the array given in the problem.
6973

7074
<!-- tabs:start -->
7175

0 commit comments

Comments
 (0)