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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy