上一页 1 ··· 267 268 269 270 271 272 273 274 275 ··· 477 下一页
摘要: Given an array of integers, find the first missing positive integer in linear time and constant space. In other words, find the lowest positive intege 阅读全文
posted @ 2019-03-08 02:56 Zhentiw 阅读(385) 评论(0) 推荐(0)
摘要: Given the root to a binary tree, implement serialize(root), which serializes the tree into a string, and deserialize(s), which deserializes the string 阅读全文
posted @ 2019-03-07 04:28 Zhentiw 阅读(550) 评论(0) 推荐(0)
摘要: // Code goes here function countNegative (M, n, m) { count = 0; i = 0; j = m - 1; while (j >=0 && i < n) { if (M[i][j] < 0) { count += (j+1) i += 1; } else { j... 阅读全文
posted @ 2019-03-06 14:25 Zhentiw 阅读(162) 评论(0) 推荐(0)
摘要: Let's say we are given an array: We want to get K = 3 smallest items from the array and using Max heap data structure. So this is how to think about i 阅读全文
posted @ 2019-03-05 22:38 Zhentiw 阅读(210) 评论(0) 推荐(0)
摘要: Shadow DOM is part of the web components specification. It allows us to ship self contained components along with their style and isolate the componen 阅读全文
posted @ 2019-03-05 19:39 Zhentiw 阅读(301) 评论(0) 推荐(0)
摘要: Forms in React are not easy. T hey are verbose and several lines of code. However, forms with Formik are much simpler. Formik maintains the state of i 阅读全文
posted @ 2019-03-05 19:33 Zhentiw 阅读(238) 评论(0) 推荐(0)
摘要: You probably have functions that aren’t equipped to accept a Maybe as an argument. And in most cases, altering functions to accept a specific containe 阅读全文
posted @ 2019-03-05 17:28 Zhentiw 阅读(272) 评论(0) 推荐(0)
摘要: We can dot-chain our way to great success with an instance of Maybe, but there are probably cases where you need to apply the same series of transform 阅读全文
posted @ 2019-03-05 17:15 Zhentiw 阅读(447) 评论(0) 推荐(0)
摘要: Given an array of integers, return a new array such that each element at index i of the new array is the product of all the numbers in the original ar 阅读全文
posted @ 2019-03-05 02:35 Zhentiw 阅读(150) 评论(0) 推荐(0)
摘要: For example there is a staricase N = 3 | | | | | | | | | | There is N = 3 staricase, for each step, you can either take {1 or 2} step at a time. So as 阅读全文
posted @ 2019-03-05 01:36 Zhentiw 阅读(216) 评论(0) 推荐(0)
上一页 1 ··· 267 268 269 270 271 272 273 274 275 ··· 477 下一页