2018年8月17日

238. Product of Array Except Self

摘要: if concerned with 0, check the elements on the side first, the situation in the middle is handled Given an array nums of n integers where n > 1, retur 阅读全文

posted @ 2018-08-17 08:11 猪猪🐷 阅读(121) 评论(0) 推荐(0)

158. Read N Characters Given Read4 II - Call multiple times

摘要: The API: int read4(char *buf) reads 4 characters at a time from a file. The return value is the actual number of characters read. For example, it retu 阅读全文

posted @ 2018-08-17 00:13 猪猪🐷 阅读(139) 评论(0) 推荐(0)

Task schedule

摘要: Task schedule https://leetcode.com/problems/task-scheduler/solution/ https://github.com/tongzhang1994/Facebook-Interview-Coding/blob/master/Task%20schedule%20with%20cool%20down%20time.java Given ... 阅读全文

posted @ 2018-08-17 00:12 猪猪🐷 阅读(468) 评论(0) 推荐(0)

157. Read N Characters Given Read4

摘要: The API: int read4(char *buf) reads 4 characters at a time from a file. The return value is the actual number of characters read. For example, it retu 阅读全文

posted @ 2018-08-17 00:12 猪猪🐷 阅读(161) 评论(0) 推荐(0)

Sparse Matrix Multiplication

摘要: Given two sparse matrices A and B, return the result of AB. You may assume that A's column number is equal to B's row number. Example: 阅读全文

posted @ 2018-08-17 00:11 猪猪🐷 阅读(165) 评论(0) 推荐(0)

Sparse vector Multiplication

摘要: Sparse vector Multiplication https://github.com/tongzhang1994/Facebook-Interview-Coding/blob/master/Sparce%20Matrix%20Multiplication.java public class Solution {//assume inputs are like {{2, 4}... 阅读全文

posted @ 2018-08-17 00:10 猪猪🐷 阅读(213) 评论(0) 推荐(0)

Print All Paths in a 2D Board

摘要: Print All Paths in a 2D Board public class Solution { private int m; private int n; public void printAllPath(char[][] grid) { int count=0; m=grid.length; if(m==0)... 阅读全文

posted @ 2018-08-17 00:09 猪猪🐷 阅读(126) 评论(0) 推荐(0)

导航