埋骨何须桑梓地,人生无处不青山。
摘要: 喜欢本园或有所收获的同学朋友们、果粉们、攻城狮们、程序猿(媛)们、码农们, 首先非常感谢大家惠临本园!作者才疏学浅,文章如有纰漏,请多指教~ 可以使用微信或支付扫一扫页面右侧的二维码进行打赏~ 金主打赏时请留下微信号~便于园主加您为好友~ 方式一:通过在打赏方式备注您的微信号~ 方式二:点击右侧的[阅读全文
posted @ 2019-03-04 15:53 山青咏芝 阅读(166) 评论(0) 编辑
摘要: 请点击页面左上角 -> Fork me on Github 或直接访问本项目Github地址:LeetCode Solution by Swift 说明:题目中含有$符号则为付费题目。 如:[Swift]LeetCode156.二叉树的上下颠倒 $ Binary Tree Upside Down 请阅读全文
posted @ 2018-11-02 13:51 山青咏芝 阅读(2940) 评论(0) 编辑
摘要: Given a non-empty string str and an integer k, rearrange the string such that the same characters are at least distance k from each other. All input s阅读全文
posted @ 2019-04-20 20:41 山青咏芝 阅读(7) 评论(0) 编辑
摘要: Given n points on a 2D plane, find if there is such a line parallel to y-axis that reflect the given set of points. Example 1: Given points = [[1,1],[阅读全文
posted @ 2019-04-20 19:22 山青咏芝 阅读(5) 评论(0) 编辑
摘要: Design a Snake game that is played on a device with screen size = width x height. Play the game online if you are not familiar with the game. The snak阅读全文
posted @ 2019-04-20 18:01 山青咏芝 阅读(5) 评论(0) 编辑
摘要: 代码: 测试:阅读全文
posted @ 2019-04-20 16:57 山青咏芝 阅读(7) 评论(0) 编辑
摘要: Given a non-empty array of integers, return the k most frequent elements. Example 1: Example 2: Input: nums = [1], k = 1 Output: [1] Example 2: Note: 阅读全文
posted @ 2019-04-20 14:46 山青咏芝 阅读(7) 评论(0) 编辑
摘要: Given an Android 3x3 key lock screen and two integers m and n, where 1 ≤ m ≤ n ≤ 9, count the total number of unlock patterns of the Android lock scre阅读全文
posted @ 2019-04-20 11:35 山青咏芝 阅读(8) 评论(0) 编辑
摘要: Design a Tic-tac-toe game that is played between two players on a n x n grid. You may assume the following rules: A move is guaranteed to be valid and阅读全文
posted @ 2019-04-20 11:05 山青咏芝 阅读(5) 评论(0) 编辑
摘要: Given a stream of integers and a window size, calculate the moving average of all integers in the sliding window. For example,MovingAverage m = new Mo阅读全文
posted @ 2019-04-20 10:27 山青咏芝 阅读(7) 评论(0) 编辑
摘要: Given a nested list of integers, implement an iterator to flatten it. Each element is either an integer, or a list -- whose elements may also be integ阅读全文
posted @ 2019-04-19 19:41 山青咏芝 阅读(9) 评论(0) 编辑
摘要: Given a string, find the length of the longest substring T that contains at most k distinct characters. For example, Given s = "eceba" and k = 2, T is阅读全文
posted @ 2019-04-19 19:25 山青咏芝 阅读(5) 评论(0) 编辑