09 2022 档案

摘要:459. Repeated Substring Pattern Given a string s, check if it can be constructed by taking a substring of it and appending multiple copies of the subs 阅读全文
posted @ 2022-09-30 03:37 BLUESociety 阅读(1571) 评论(0) 推荐(0) 编辑
摘要:28. Find the Index of the First Occurrence in a String Given two strings needle and haystack, return the index of the first occurrence of needle in ha 阅读全文
posted @ 2022-09-30 03:02 BLUESociety 阅读(593) 评论(0) 推荐(0) 编辑
摘要:344. Reverse String Write a function that reverses a string. The input string is given as an array of characters s. You must do this by modifying the 阅读全文
posted @ 2022-09-29 00:18 BLUESociety 阅读(1753) 评论(0) 推荐(0) 编辑
摘要:454. 4Sum II Given four integer arrays nums1, nums2, nums3, and nums4 all of length n, return the number of tuples (i, j, k, l) such that: 0 <= i, j, 阅读全文
posted @ 2022-09-28 03:10 BLUESociety 阅读(1826) 评论(0) 推荐(0) 编辑
摘要:Hash table 一般哈希表都是用来快速判断一个元素是否出现集合里。 例如要查询一个名字是否在这所学校里。 要枚举的话时间复杂度是O(n),但如果使用哈希表的话, 只需要O(1)就可以做到。 Hash Function 通过hashCode把名字转化为数值,一般hashcode是通过特定编码方式 阅读全文
posted @ 2022-09-27 05:11 BLUESociety 阅读(1987) 评论(0) 推荐(0) 编辑
摘要:24. Swap Nodes in Pairs Given a linked list, swap every two adjacent nodes and return its head. You must solve the problem without modifying the value 阅读全文
posted @ 2022-09-24 01:53 BLUESociety 阅读(1987) 评论(0) 推荐(0) 编辑
摘要:###链表理论基础 链表是一种通过指针串联在一起的线性结构,每一个节点由两部分组成,一个是数据域(Node) 一个是指针域(Next),最后一个节点的指针域指向null。 链接的入口节点称为链表的头结点也就是head。 单链表中的指针域只能指向节点的下一个节点。 双链表:每一个节点有两个指针域,一个 阅读全文
posted @ 2022-09-23 02:57 BLUESociety 阅读(2358) 评论(0) 推荐(0) 编辑
摘要:977. Squares of a sorted Array Given an integer array nums sorted in non-decreasing order, return an array of the squares of each number sorted in non 阅读全文
posted @ 2022-09-22 06:02 BLUESociety 阅读(2491) 评论(0) 推荐(0) 编辑
摘要:数组理论基础 数组是存放在连续内存空间上的相同类型数据的集合。 start with index 0 数组内存空间的地址是连续的 数组的元素是不能删的,只能覆盖。 二维数组: Binary Search 通过不断缩小搜索区间的范围,直到找到目标元素或者没有找到目标元素。 每一轮排除掉一定不存在目标元 阅读全文
posted @ 2022-09-22 01:27 BLUESociety 阅读(2743) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示