LeetCode-3Sum
Given an integer array nums, return all the triplets numsi, numsj, numsk such that i != j, i != k, and j != k, and numsi + numsj + numsk == 0
Given an integer array nums, return all the triplets numsi, numsj, numsk such that i != j, i != k, and j != k, and numsi + numsj + numsk == 0
Given an array of integers nums and an integer target, return _indices of the two numbers such that they add up to target
使用Vagrant重新搭建一个测试环境,只需要简单几步就可以启动一个测试环境。
Do not communication by sharing memory; instead,share memory by communicating
Sequence这个例子,调用sort package中的方法,对于集合要实现sort的接口:Len(), Less(i,j int) bool 和 Swap(i,j int)。Sequence同时通过String()对集合内容进行格式化。 String()接口通过 “for i, elem := range”方式实现…
分配 通过new和make分配空间: - new分配空间,返回指针 - make可以进行生成slices,maps,channels,返回类型 go中更推荐使用切片而不是数组。 - 数组长度固定 - 切片可以动态调整容量(cap) 下面是二位数组和二位切片的示例。 key,value形式的数据结构,key可以是整数,浮…
若在一行最后一个标识符为以下类型 - 数字 - 字符串常量 - 特殊标识符号;break continue fallthrough return ++ -- ) } 词法分析器会在标识符后添加分号, 与C不同GO很多地方都省略分号。 另在在if for switch select控制结构后要接 “{”, 例如: 而不要…
Given a list of unique words, return all the pairs of the _distinct_ indices (i, j) in the given list, so that the concatenation of the two words words[i] +…
为了减少磁盘I/O,加快读写速度,Linux内核使用文件系统的Cache,Page Cache。
昨天正在听一位老师的英语的直播课, 当时她正在用影片的片段讲解英文听力课,讲到一半的时候,直播中断了。 显示“stream suspended for policy violations” 后来查了下资料才知道, 平台通过Connent ID系统的运作方式来识别和管理上传的视频和音频版权。 千亿美金的YouTube:…