摘要: 125. Valid Palindrome A phrase is a palindrome if, after converting all uppercase letters into lowercase letters and removing all non-alphanumeric cha 阅读全文
posted @ 2023-01-10 17:00 AaronTanooo 阅读(20) 评论(0) 推荐(0)
摘要: 128. Longest Consecutive Sequence Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence. You must w 阅读全文
posted @ 2023-01-10 15:34 AaronTanooo 阅读(41) 评论(0) 推荐(0)
摘要: 271. Encode and Decode Strings 居然要premium才能做,果断换LintCode来写这题 Design an algorithm to encode a list of strings to a string. The encoded string is then s 阅读全文
posted @ 2023-01-09 19:23 AaronTanooo 阅读(24) 评论(0) 推荐(0)
摘要: 238. Product of Array Except Self Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements 阅读全文
posted @ 2023-01-09 18:37 AaronTanooo 阅读(19) 评论(0) 推荐(0)
摘要: 347. Top K Frequent Elements Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order 阅读全文
posted @ 2023-01-09 15:37 AaronTanooo 阅读(23) 评论(0) 推荐(0)
摘要: 49. Group Anagrams Given an array of strings strs, group the anagrams together. You can return the answer in any order. An Anagram is a word or phrase 阅读全文
posted @ 2023-01-09 14:58 AaronTanooo 阅读(28) 评论(0) 推荐(0)
摘要: 1. Two Sum Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume th 阅读全文
posted @ 2023-01-09 14:10 AaronTanooo 阅读(22) 评论(0) 推荐(0)
摘要: 242. Valid Anagram Given two strings s and t, return true if t is an anagram of s, and false otherwise. An Anagram is a word or phrase formed by rearr 阅读全文
posted @ 2023-01-09 13:42 AaronTanooo 阅读(18) 评论(0) 推荐(0)
摘要: 217. Contains Duplicate Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element i 阅读全文
posted @ 2023-01-09 11:26 AaronTanooo 阅读(23) 评论(0) 推荐(0)
摘要: 基础概念 工厂方法模式(Factory Method Pattern) 也被称为多态工厂模式,其定义了一个创建某种产品的接口,但由子类决定要实例化的产品是哪一个,从而把产品的实例化推迟到子类 策略模式(Strategy Pattern) 定义了一组策略,分别在不同类中封装起来,每种策略都可以根据当前 阅读全文
posted @ 2022-12-07 14:17 AaronTanooo 阅读(198) 评论(0) 推荐(0)