311. Sparse Matrix Multiplication

public class Solution {
    public int[][] multiply(int[][] A, int[][] B) {
        int m=A.length,n=A[0].length,nB=B[0].length;
        int[][] res=new int[m][nB];
        for(int i=0;i
public class Solution {
    class Node{
        int x,y;
        Node(int x,int y){
            this.x=x;
            this.y=y;
        }
    }
    public int[][] multiply(int[][] A, int[][] B) {
        int[][] res=new int[A.length][B[0].length];
        List l1=new ArrayList<>();
        List l2=new ArrayList<>();
        
        for(int i=0;i

你可能感兴趣的:(311. Sparse Matrix Multiplication)