随笔分类 - 算法
摘要:582. Kill Process 582. Kill Process Given n processes, each process has a unique PID (process id) and its PPID (parent process id). Each process only
阅读全文
摘要:554. Brick Wall 554. Brick Wall There is a brick wall in front of you. The wall is rectangular and has several rows of bricks. The bricks have the sam
阅读全文
摘要:367. Valid Perfect Square 367. Valid Perfect Square Given a positive integer num, write a function which returns True if num is a perfect square else
阅读全文
摘要:537. Complex Number Multiplication 537. Complex Number Multiplication Given two strings representing two complex numbers. You need to return a string
阅读全文
摘要:557. Reverse Words in a String III 557. Reverse Words in a String III Given a string, you need to reverse the order of characters in each word within
阅读全文
摘要:368. Largest Divisible Subset 368. Largest Divisible Subset Given a set of distinct positive integers, find the largest subset such that every pair (S
阅读全文
摘要:542. 01 Matrix 542. 01 Matrix Given a matrix consists of 0 and 1, find the distance of the nearest 0 for each cell. The distance between two adjacent
阅读全文
摘要:538. Convert BST to Greater Tree 538. Convert BST to Greater Tree Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key o
阅读全文
摘要:543. Diameter of Binary Tree 543. Diameter of Binary Tree Given a binary tree, you need to compute the length of the diameter of the tree. The diamete
阅读全文
摘要:503. Next Greater Element II 503. Next Greater Element II Given a circular array (the next element of the last element is the first element of the arr
阅读全文
摘要:526. Beautiful Arrangement 526. Beautiful Arrangement Suppose you have N integers from 1 to N. We define a beautiful arrangement as an array that is c
阅读全文
摘要:524. Longest Word in Dictionary through Deleting 524. Longest Word in Dictionary through Deleting Given a string and a string dictionary, find the lon
阅读全文
摘要:541. Reverse String II Given a string and an integer k, you need to reverse the first k characters for every 2k characters counting from the start of
阅读全文
摘要:523. Continuous Subarray Sum Add to List Given a list of non-negative numbers and a target integer k, write a function to check if the array has a con
阅读全文
摘要:Given a list of 24-hour clock time points in "Hour:Minutes" format, find the minimum minutes difference between any two time points in the list. Examp
阅读全文

浙公网安备 33010602011771号