09 2018 档案
摘要:Given a function rand7 which generates a uniform random integer in the range 1 to 7, write a function rand10 which generates a uniform random integer
阅读全文
摘要:You are given a doubly linked list which in addition to the next and previous pointers, it could have a child pointer, which may or may not point to a
阅读全文
摘要:Given an n-ary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example, given a 3-ary tree:
阅读全文
摘要:We want to use quad trees to store an N x N boolean grid. Each cell in the grid can only be true or false. The root node represents the whole grid. Fo
阅读全文
摘要:Convert a BST to a sorted circular doubly-linked list in-place. Think of the left and right pointers as synonymous to the previous and next pointers i
阅读全文
摘要:You are given the head of a linked list containing unique integer values and an integer array nums that is a subset of the linked list values. Return
阅读全文