摘要: #pragma mark - TextViewDelegate - (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text { if ( 阅读全文
posted @ 2021-07-01 10:14 syh-918 阅读(45) 评论(0) 推荐(0)
摘要: public class QuickSort<T extends Comparable<T>> extends Sort<T> { @Override protected void sort() { sort(0, array.length); } /** * 对 [begin, end) 范围的元 阅读全文
posted @ 2021-07-01 10:10 syh-918 阅读(51) 评论(0) 推荐(0)
摘要: https://leetcode-cn.com/problems/letter-combinations-of-a-phone-number/ public class _17_电话号码的字母组合2 { private char[][] lettersArray = { {'a', 'b', 'c' 阅读全文
posted @ 2021-07-01 09:49 syh-918 阅读(146) 评论(0) 推荐(0)
摘要: 基金 : 基金中的角色 : 管理者 投资者 托管者 基金的分类 : 股票基金,指数基金,混混基金,货币基金,债券基金,场内基金,场外基金。 基金投资的优势:省事 分散投资相对安全 阅读全文
posted @ 2021-06-30 16:57 syh-918 阅读(22) 评论(0) 推荐(0)
摘要: https://leetcode-cn.com/problems/largest-bst-subtree/ public int largestBSTSubtree(TreeNode root) { return (root == null) ? 0 : getInfo(root).size; } 阅读全文
posted @ 2021-06-29 10:12 syh-918 阅读(91) 评论(0) 推荐(0)
摘要: 电量 影响因素: 定位蓝牙,cpu频率,网络请求,内存调度,后台任务,TCP保活 监测方案: UIDevice * device = [UIDevice currentDevice] 优化方案: UI方向:UI刷新频率刷新范围,懒加载,复用 ,缓存 CPU方向:复杂计算放在服务端,图层绘制,透明度 阅读全文
posted @ 2021-06-28 13:41 syh-918 阅读(58) 评论(0) 推荐(0)
摘要: https://leetcode-cn.com/problems/edit-distance/ 思路一:动态规划来做 public int minDistance(String word1, String word2) { if (word1 == null || word2 == null) re 阅读全文
posted @ 2021-06-27 21:53 syh-918 阅读(29) 评论(0) 推荐(0)
摘要: https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock/ 思路一: 记录买入的最小值,每天卖出的值与最小值买入值做比较得到利润最大值 思路二:动态规划,前后两天相差值组成数组,求子数组最大和 public int maxPro 阅读全文
posted @ 2021-06-27 21:07 syh-918 阅读(44) 评论(0) 推荐(0)
摘要: https://leetcode-cn.com/problems/li-wu-de-zui-da-jie-zhi-lcof/ 思路:动态规划的思想 public int maxValue(int[][] grid) { int rows = grid.length; int cols = grid[ 阅读全文
posted @ 2021-06-27 18:04 syh-918 阅读(56) 评论(0) 推荐(0)
摘要: https://leetcode-cn.com/problems/longest-substring-without-repeating-characters/ 思路1 以每个字符为结尾的最长自窜(类似于动态规划)利用上一个最长自窜的位置+上一次出现本字符的位置pi 分为两种就好 pi<li pi> 阅读全文
posted @ 2021-06-27 17:39 syh-918 阅读(46) 评论(0) 推荐(0)