上一页 1 ··· 261 262 263 264 265 266 267 268 269 ··· 494 下一页
摘要: /**@abstract * Write your own Math.pow(a int, b int) function * */ function pow (a, b) { let result = 0; let nigate = b = 2) { result = isEven ? pow(a, b / 2) * pow(a, b / 2) : a * pow(... 阅读全文
posted @ 2019-03-08 19:06 Zhentiw 阅读(195) 评论(0) 推荐(0)
摘要: cons(a, b) constructs a pair, and car(pair) and cdr(pair) returns the first and last element of that pair. For example, car(cons(3, 4)) returns 3, and 阅读全文
posted @ 2019-03-08 18:16 Zhentiw 阅读(305) 评论(0) 推荐(0)
摘要: Showing how to use 'uqrl' library to do GraphQL in React. 阅读全文
posted @ 2019-03-08 14:36 Zhentiw 阅读(370) 评论(0) 推荐(0)
摘要: 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 阅读(375) 评论(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 阅读(534) 评论(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 阅读(150) 评论(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 阅读(187) 评论(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 阅读(286) 评论(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 阅读(219) 评论(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 阅读(254) 评论(0) 推荐(0)
上一页 1 ··· 261 262 263 264 265 266 267 268 269 ··· 494 下一页