摘要: https://leetcode-cn.com/problems/divide-two-integers/solution/golang-yong-jia-fa-he-yi-wei-dai-ti-cheng-2-by-blo/ 阅读全文
posted @ 2020-12-01 18:28 TR_Goldfish 阅读(60) 评论(0) 推荐(0) 编辑
摘要: 位操作是程序设计中对位模式按位或二进制数的一元和二元操作. 在许多古老的微处理器上, 位运算比加减运算略快, 通常位运算比乘除法运算要快很多. 在现代架构中, 情况并非如此:位运算的运算速度通常与加法运算相同(仍然快于乘法运算). 位操作符 一、简介 关于位运算的操作,维基百科关于 位操作符 的理论 阅读全文
posted @ 2020-12-01 18:19 TR_Goldfish 阅读(286) 评论(0) 推荐(0) 编辑
摘要: 11. 盛最多水的容器 package main import "fmt" func min(a int,b int)(c int){ if a>b{ c=b }else { c=a } return } func maxArea(height []int) int { left,right := 阅读全文
posted @ 2020-12-01 16:19 TR_Goldfish 阅读(67) 评论(0) 推荐(0) 编辑
摘要: 34. 在排序数组中查找元素的第一个和最后一个位置 func SearchInts ¶ func SearchInts(a []int, x int) int SearchInts searches for x in a sorted slice of ints and returns the in 阅读全文
posted @ 2020-12-01 15:46 TR_Goldfish 阅读(89) 评论(0) 推荐(0) 编辑