06 2021 档案

摘要:基金 : 基金中的角色 : 管理者 投资者 托管者 基金的分类 : 股票基金,指数基金,混混基金,货币基金,债券基金,场内基金,场外基金。 基金投资的优势:省事 分散投资相对安全 阅读全文
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 阅读(97) 评论(0) 推荐(0)
摘要:电量 影响因素: 定位蓝牙,cpu频率,网络请求,内存调度,后台任务,TCP保活 监测方案: UIDevice * device = [UIDevice currentDevice] 优化方案: UI方向:UI刷新频率刷新范围,懒加载,复用 ,缓存 CPU方向:复杂计算放在服务端,图层绘制,透明度 阅读全文
posted @ 2021-06-28 13:41 syh-918 阅读(60) 评论(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 阅读(30) 评论(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 阅读(48) 评论(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 阅读(60) 评论(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 阅读(47) 评论(0) 推荐(0)
摘要:https://leetcode-cn.com/problems/reverse-words-in-a-string/ 思路:删除多余的空格,修好一个方法,给一定范围,翻转一定范围的字符串 public static String reverseWords(String s) { if (s == 阅读全文
posted @ 2021-06-27 17:16 syh-918 阅读(47) 评论(0) 推荐(0)
摘要:https://leetcode-cn.com/problems/valid-anagram/ 思路1 统计字符数哈希表 思路2 使用数组记录出现次数 public boolean isAnagram(String s, String t) { if (s == null || t == null) 阅读全文
posted @ 2021-06-27 17:04 syh-918 阅读(67) 评论(0) 推荐(0)
摘要:https://leetcode-cn.com/problems/subtree-of-another-tree/ public boolean isSubtree(TreeNode s, TreeNode t) { if (s == null || t == null) return false; 阅读全文
posted @ 2021-06-27 16:44 syh-918 阅读(64) 评论(0) 推荐(0)
摘要:https://leetcode-cn.com/problems/flipped-string-lcci/ 思路1: 将目标字符串 s1,拼接上自己,判断给的字符串是否是当前拼接字符串的子串; public static boolean isRevolving(String s1, String s 阅读全文
posted @ 2021-06-27 16:38 syh-918 阅读(38) 评论(0) 推荐(0)
摘要:https://leetcode-cn.com/problems/daily-temperatures/ 思路1: 使用单调递减栈 public int[] dailyTemperatures(int[] T) { if (T == null || T.length == 0) return nul 阅读全文
posted @ 2021-06-27 15:02 syh-918 阅读(51) 评论(0) 推荐(0)
摘要:https://leetcode-cn.com/problems/maximum-binary-tree/ 思路1:用递归的思想来解决问题 思路2: 利用栈来解决,找出左边第一个比较大值,和右边第一个比较大值,两两比较取大的一个 public TreeNode constructMaximumBin 阅读全文
posted @ 2021-06-27 14:55 syh-918 阅读(51) 评论(0) 推荐(0)
摘要:https://leetcode-cn.com/problems/sliding-window-maximum/ 思路0:直接遍历,对比k个元素。 思路1:先确认最大值数组个数,踢出掉不能作为滑动窗口的第一个值。使用双端队列来解决问题,双端队列保存的是索引 思路2:对暴力法的优化,记录下上一次的最大 阅读全文
posted @ 2021-06-26 21:41 syh-918 阅读(56) 评论(0) 推荐(0)
摘要:https://leetcode-cn.com/problems/min-stack/ 思路1 空间换时间思想 ,内部初始化一个正常栈,另一个村最小栈,push进一个值后 最小栈内也要push进当前最小值。 思路2 依然还是空间换时间,使用链表来实现 public class MinStack { 阅读全文
posted @ 2021-06-26 21:36 syh-918 阅读(33) 评论(0) 推荐(0)
摘要:https://leetcode-cn.com/problems/palindrome-linked-list/ 思路1: 先判断链表节点为空,为一个,为两个的情况,利用快慢指针找到中间节点,翻转部分节点 思路2: 先判断链表节点为空,为一个,为两个的情况,翻转链表然后对比(空间复杂度不符合) 思路 阅读全文
posted @ 2021-06-26 18:35 syh-918 阅读(43) 评论(0) 推荐(0)
摘要:https://leetcode-cn.com/problems/partition-list/ 思路 各自的部分弄成一个链表然后头尾相接,用到虚拟节点 代码 public ListNode partition(ListNode head, int x) { if (head == null) re 阅读全文
posted @ 2021-06-26 18:14 syh-918 阅读(47) 评论(0) 推荐(0)
摘要:https://leetcode-cn.com/problems/intersection-of-two-linked-lists/ 思路 :拼接两个链表使他们长度相同 然后遍历两个链表 public ListNode getIntersectionNode(ListNode headA, List 阅读全文
posted @ 2021-06-26 17:57 syh-918 阅读(42) 评论(0) 推荐(0)
摘要:https://leetcode-cn.com/problems/add-two-numbers/ public ListNode addTwoNumbers(ListNode l1, ListNode l2) { if (l1 == null) return l2; if (l2 == null) 阅读全文
posted @ 2021-06-26 17:43 syh-918 阅读(39) 评论(0) 推荐(0)
摘要:做链表提多画图,%99以上都要画图解决 虚拟借点 快慢指针 多指针 1. 输入 1-2-3-4-5-6-5-6;删除掉6的节点 思路:用到虚拟头节点 ,如果是删除的这 head = head.next; 如果不是 newTail.next = head; newTail = head; public 阅读全文
posted @ 2021-06-26 17:25 syh-918 阅读(97) 评论(0) 推荐(0)
摘要:输入: [1,2,4,7,10,11,7,12,6,7,16,18,19]输出: [3,9] 思路 从右往左找第一个逆序对,从做到要找第一个逆序对 找出坐标 public int[] subSort(int[] nums) { if (nums.length == 0) return new int 阅读全文
posted @ 2021-06-26 16:25 syh-918 阅读(93) 评论(0) 推荐(0)
摘要:/* 给定一个包含红色、白色和蓝色,一共 n 个元素的数组,原地对它们进行排序,使得相同颜色的元素相邻,并按照红色、白色、蓝色顺序排列。 此题中,我们使用整数 0、 1 和 2 分别表示红色、白色和蓝色。 来源:力扣(LeetCode)链接:https://leetcode-cn.com/probl 阅读全文
posted @ 2021-06-26 16:01 syh-918 阅读(470) 评论(0) 推荐(0)
摘要:给你两个有序整数数组 nums1 和 nums2,请你将 nums2 合并到 nums1 中,使 nums1 成为一个有序数组。 初始化 nums1 和 nums2 的元素数量分别为 m 和 n 。你可以假设 nums1 的空间大小等于 m + n,这样它就有足够的空间保存来自 nums2 的元素。 阅读全文
posted @ 2021-06-26 15:52 syh-918 阅读(136) 评论(0) 推荐(0)
摘要:对称加密 DES 3DES AES 其中DES 3DES已经被破解不安全了 ,优先选用ADE先进的对称加密算法。 非对称加密 混合加密 单向散列行数 数字签名 阅读全文
posted @ 2021-06-25 10:11 syh-918 阅读(173) 评论(0) 推荐(0)
摘要:- (SSNode *)mergerLink:(SSNode *)nodeHeadOne nodeHeadTwo:(SSNode *)nodeHeadTwo { SSNode *cur = nil; SSNode *newHead = nil; //赋值newhead if(nodeHeadOne. 阅读全文
posted @ 2021-06-24 10:00 syh-918 阅读(67) 评论(0) 推荐(0)
摘要:寄存器 64位汇编:x0-x28 32位汇编:w0-w28 x0 通常用作返回值 x0-x7用作参数,再有更多的参数使用堆栈来存放 汇编指令 ret 返回 mov x0 #0x8 把8移到x0寄存器中 add x0 x0 x1 加发运算 sub 0x x0 x1 减法 b code 跳转 跳转到co 阅读全文
posted @ 2021-06-23 09:58 syh-918 阅读(301) 评论(0) 推荐(0)
摘要:1. 早先计算机只有物理内存有什么缺点 1.1 连续的物理内存,造成进程之间数据可能相互混合,造成数据安全问题 1.2 当物理内存不够的时候,会用到磁盘,这样磁盘到内存间切换,造成访问效率问题 2 虚拟内存概念 页(4kb) 叶匡(4kb) 页表 页:页是虚拟内存上分段的最小单位4kb 叶匡:物理内 阅读全文
posted @ 2021-06-23 09:47 syh-918 阅读(481) 评论(0) 推荐(0)
摘要:1. LLVM 是什么? 1.1 编译器集合 2.LLVM 能干嘛? 2.1开发编译器的插件 代码规范 3. 编译器架构 3.1 前端:词法分析(生成token),语法分析(生成语法树 AST), 生成中间代码 优化器:优化 后端:生产机器码 4.LLVM编译器架构特点 前端有多种,后端有多种,中间 阅读全文
posted @ 2021-06-18 14:06 syh-918 阅读(90) 评论(0) 推荐(0)
摘要:- (int)cmp:(NSArray *)array idx:(int)idx idx1:(int)idx1{ return [array[idx] intValue] - [array[idx1] intValue]; } - (void)swap:(NSMutableArray *)array 阅读全文
posted @ 2021-06-02 15:10 syh-918 阅读(55) 评论(0) 推荐(0)