摘要:
题目: Follow up for "Remove Duplicates":What if duplicates are allowed at most twice? For example,Given sorted array nums = [1,1,1,2,2,3], Your function 阅读全文
摘要:
2. 菜鸟仓库是一个很大很神奇的地方,各种琳琅满目的商品整整齐齐地摆放在一排排货架上,通常一种品类(sku)的商品会放置在货架的某一个格子中,格子设有统一的编号,方便工人们拣选。 有一天沐哲去菜鸟仓库参观,无意中发现第1个货架格子编码为1,第2-3个分别为1,2,第4-6个格子分别是1,2,3,第7 阅读全文
摘要:
题目: 给定一整数数列,问数列有多少个子序列是等差数列。 即对于包含N个数的数列A,A(0),A(1),……,A(N-1),有多少组(P(0),P(1),……,P(k))满足0<=P(0)<P(1)<……<P(k)<N,且A(P(0)),A(P(1)),……,A(P(k))为等差数列。 等差数列至少 阅读全文
摘要:
题目: Given an array of integers, every element appears three times except for one. Find that single one. Note:Your algorithm should have a linear runti 阅读全文
摘要:
1.默认编译时总会出现错误 报错: [Finished in 1.3s with exit code 1][cmd: ['gcc', 'V:\\Cynthia\\01.c']][dir: V:\Cynthia][path: C:\Windows\System32\WindowsPowerShell\ 阅读全文
摘要:
针对2017版本安装 1. 安装windows通用平台工具出错 报错信息:15605 FQ安装。 2. LINK : fatal error LNK1104: 无法打开文件“gdi32.lib” 在安装文件中找到 单个组件——安装支持c++ x86和x64的win 10 SDK 10.0.15063 阅读全文
摘要:
题目: Given n x m non-negative integers representing an elevation map 2d where the area of each cell is 1 x 1, compute how much water it is able to trap 阅读全文
摘要:
题目: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after rain 阅读全文