07 2019 档案

摘要:题目如下: Given two arrays arr1 and arr2, the elements of arr2 are distinct, and all elements in arr2 are also in arr1. Sort the elements of arr1 such tha 阅读全文
posted @ 2019-07-23 15:25 seyjs 阅读(657) 评论(0) 推荐(0)
摘要:题目如下: Given a rooted binary tree, return the lowest common ancestor of its deepest leaves. Recall that: The node of a binary tree is a leaf if and onl 阅读全文
posted @ 2019-07-23 15:20 seyjs 阅读(354) 评论(0) 推荐(0)
摘要:题目如下: Given a list of dominoes, dominoes[i] = [a, b] is equivalent to dominoes[j] = [c, d] if and only if either (a==c and b==d), or (a==d and b==c) - 阅读全文
posted @ 2019-07-23 15:08 seyjs 阅读(395) 评论(0) 推荐(0)
摘要:题目如下: There are n flights, and they are labeled from 1 to n. We have a list of flight bookings. The i-th booking bookings[i] = [i, j, k] means that we 阅读全文
posted @ 2019-07-11 14:53 seyjs 阅读(526) 评论(0) 推荐(0)
摘要:题目如下: A string is a valid parentheses string (denoted VPS) if and only if it consists of "(" and ")" characters only, and: It is the empty string, or 阅读全文
posted @ 2019-07-08 15:57 seyjs 阅读(586) 评论(0) 推荐(0)
摘要:题目如下: Given the root of a binary tree, each node in the tree has a distinct value. After deleting all nodes with a value in to_delete, we are left wit 阅读全文
posted @ 2019-07-08 15:46 seyjs 阅读(753) 评论(0) 推荐(0)
摘要:题目如下: Given a valid (IPv4) IP address, return a defanged version of that IP address. A defanged IP address replaces every period "."with "[.]". Exampl 阅读全文
posted @ 2019-07-08 15:38 seyjs 阅读(1033) 评论(0) 推荐(0)
摘要:题目如下: Return the result of evaluating a given boolean expression, represented as a string. An expression can either be: "t", evaluating to True; "f", 阅读全文
posted @ 2019-07-05 17:45 seyjs 阅读(500) 评论(0) 推荐(0)
摘要:题目如下: In an infinite binary tree where every node has two children, the nodes are labelled in row order. In the odd numbered rows (ie., the first, thi 阅读全文
posted @ 2019-07-04 11:17 seyjs 阅读(536) 评论(0) 推荐(0)
摘要:题目如下: We distribute some number of candies, to a row of n = num_people people in the following way: We then give 1 candy to the first person, 2 candie 阅读全文
posted @ 2019-07-04 11:06 seyjs 阅读(506) 评论(0) 推荐(0)