We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1a1547 commit f92337aCopy full SHA for f92337a
src/main/java/com/fishercoder/solutions/_1570.java
@@ -2,6 +2,9 @@
2
3
public class _1570 {
4
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.*/
8
class SparseVector {
9
int[] vector;
10
0 commit comments