05 2021 档案

摘要:Given an array arr of positive integers, consider all binary trees such that: Each node has either 0 or 2 children; The values of arr correspond to th 阅读全文
posted @ 2021-05-30 07:45 Grandyang 阅读(1099) 评论(4) 推荐(0) 编辑
摘要:Consider a directed graph, with nodes labelled 0, 1, ..., n-1. In this graph, each edge is either red or blue, and there could be self-edges or parall 阅读全文
posted @ 2021-05-27 11:56 Grandyang 阅读(886) 评论(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) - that 阅读全文
posted @ 2021-05-24 02:24 Grandyang 阅读(397) 评论(0) 推荐(0) 编辑
摘要:In a project, you have a list of required skills req_skills, and a list of people. The ith person people[i] contains a list of skills that the person 阅读全文
posted @ 2021-05-19 11:37 Grandyang 阅读(725) 评论(0) 推荐(0) 编辑
摘要:We are given hours, a list of the number of hours worked per day for a given employee. A day is considered to be a tiring day if and only if the numbe 阅读全文
posted @ 2021-05-16 01:22 Grandyang 阅读(687) 评论(0) 推荐(0) 编辑
摘要: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 that the 阅读全文
posted @ 2021-05-13 12:32 Grandyang 阅读(610) 评论(0) 推荐(0) 编辑
摘要:博主在用 Hexo 搭建博客的时候,一直在考虑评论系统用什么,最终比较了多家,决定用 Gitalk,这是一个基于 Github Issues 的评论系统,所有的评论内容都保存在 Github Issues 中,每篇博客对应一个 Issues。只有登陆 Github 账号才能评论,大多数人应该都会有 阅读全文
posted @ 2021-05-12 12:13 Grandyang 阅读(637) 评论(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 It can 阅读全文
posted @ 2021-05-09 22:38 Grandyang 阅读(450) 评论(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 with a fo 阅读全文
posted @ 2021-05-09 02:33 Grandyang 阅读(1696) 评论(0) 推荐(0) 编辑
摘要:There are n flights that are labeled from 1 to n. You are given an array of flight bookings bookings, where bookings[i] = [firsti, lasti, seatsi] repr 阅读全文
posted @ 2021-05-06 12:25 Grandyang 阅读(772) 评论(0) 推荐(0) 编辑
摘要:Given a valid (IPv4) IP address, return a defanged version of that IP address. A defanged IP address replaces every period "." with "[.]". Example 1: 阅读全文
posted @ 2021-05-05 12:48 Grandyang 阅读(576) 评论(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", evalua 阅读全文
posted @ 2021-05-02 06:41 Grandyang 阅读(668) 评论(0) 推荐(0) 编辑

Fork me on GitHub