算法
从来不作
closer to the edge
展开
-
层次遍历创建二叉树
代码如下: 输入:示例原创 2022-05-31 23:07:18 · 1357 阅读 · 0 评论 -
二分查找相关
文章目录最普通的find left most吃香蕉参考资料 二分查找虽然简单,但是想做到bug free还是很难的。 最普通的 func search(nums []int, target int) int { low := 0 high := len(nums)-1 for low <= high { mid := low + (high - low) / 2 if nums[mid] == target { return mid } else if nums[mid]原创 2022-05-29 17:31:56 · 79 阅读 · 0 评论 -
booking——all_anagram_groups
题目 Implement a function all_anagram_groups() that, given many input strings, will identify and group words that are anagrams of each other. An anagram is word that is just a re-arrangement of the characters of another word, like "reap" and "pear" and "a原创 2022-05-28 15:46:04 · 74 阅读 · 0 评论