摘要: Given an input string s and a pattern p, implement regular expression matching with support for '.' and '*' where: '.' Matches any single character.​​ 阅读全文
posted @ 2022-11-28 09:23 little_veggie 阅读(17) 评论(0) 推荐(0)
摘要: There are n soldiers standing in a line. Each soldier is assigned a unique rating value. You have to form a team of 3 soldiers amongst them under the 阅读全文
posted @ 2020-11-08 08:21 little_veggie 阅读(92) 评论(0) 推荐(0)
摘要: Given a string, your task is to count how many palindromic substrings in this string. The substrings with different start indexes or end indexes are c 阅读全文
posted @ 2020-11-03 14:13 little_veggie 阅读(106) 评论(0) 推荐(0)
摘要: There is a new alien language which uses the latin alphabet. However, the order among letters are unknown to you. You receive a list of non-empty word 阅读全文
posted @ 2020-11-03 13:27 little_veggie 阅读(81) 评论(0) 推荐(0)
摘要: Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequ 阅读全文
posted @ 2020-11-02 14:30 little_veggie 阅读(77) 评论(0) 推荐(0)
摘要: Given a string s containing only digits, return all possible valid IP addresses that can be obtained from s. You can return them in any order. A valid 阅读全文
posted @ 2020-11-02 08:51 little_veggie 阅读(87) 评论(0) 推荐(0)
摘要: Convert a Binary Search Tree to a sorted Circular Doubly-Linked List in place. You can think of the left and right pointers as synonymous to the prede 阅读全文
posted @ 2020-11-01 12:52 little_veggie 阅读(53) 评论(0) 推荐(0)
摘要: Given the head of a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-b 阅读全文
posted @ 2020-11-01 11:50 little_veggie 阅读(88) 评论(0) 推荐(0)
摘要: Given an n-ary tree, return the level order traversal of its nodes' values. Nary-Tree input serialization is represented in their level order traversa 阅读全文
posted @ 2020-10-31 12:49 little_veggie 阅读(49) 评论(0) 推荐(0)
摘要: Given the root of a binary tree with N nodes, each node in the tree has node.val coins, and there are N coins total. In one move, we may choose two ad 阅读全文
posted @ 2020-10-29 14:56 little_veggie 阅读(58) 评论(0) 推荐(0)