Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf92337a

Browse files
refactor 1570
1 parentd1a1547 commitf92337a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎src/main/java/com/fishercoder/solutions/_1570.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
publicclass_1570 {
44
publicstaticclassSolution1 {
5+
/**This is a brute force but accepted solution.
6+
* More optimal solution:
7+
* use a map to store only non-zero values and use the smaller vector to do multiplication to reduce space and save time.*/
58
classSparseVector {
69
int[]vector;
710

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp