Skip to content

Commit f92337a

Browse files
refactor 1570
1 parent d1a1547 commit f92337a

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
public class _1570 {
44
public static class Solution1 {
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
class SparseVector {
69
int[] vector;
710

0 commit comments

Comments
 (0)