c++
文章平均质量分 92
内推锦鲤
前端工程师
展开
-
leetcode-DAY2-[167,189.283]
总结今天所用到的vector的知识insert[ ] iterator insert (iterator position, const value_type& val);在position位置插入val,返回迭代器;[ ] void insert (iterator position, size_type n, const value_type& val);在posit...原创 2018-07-23 17:46:02 · 122 阅读 · 0 评论 -
leetcode-string-easy-696-788
每天坚持写几道leetcode,希望几个月后我就不再是小白 今天的题目是696,788题目:696. Count Binary Substrings描述:Give a string s, count the number of non-empty (contiguous) substrings that have the same number of 0’s and 1’s,...原创 2018-08-11 12:02:16 · 195 阅读 · 0 评论 -
leetcode-string-easy-4
每天坚持写几道leetcode,希望几个月后我就不再是小白 今天的题目是521,824,20,520 附stack string容器用法总结总结收获stack用法:empty() pop() push() size() top() string用法:append() insert() substr() append连接 basic_string ...原创 2018-08-10 12:24:00 · 170 阅读 · 0 评论 -
leetcode-array-easy-over
【53,119,213,268,414,448,485,532,561,566,581,605,628,643,665,674,697,717,724,746,747,766,830,849,867】 Given an integer array nums, find the contiguous subarray (containing at least one number) w...原创 2018-08-05 15:36:33 · 252 阅读 · 0 评论 -
leetcode-string-easy-4
每天坚持写几道leetcode,希望几个月后我就不再是小白 今天的题目是344,557,657,804总结收获unordered_map,unordered_set,map和set的区别:unordered_map存储机制是哈希表,即unordered_map内部元素是无序的。map是红黑树,map中的元素是按照二叉搜索树存储,进行中序遍历会得到有序遍历。unorder...原创 2018-08-09 11:23:04 · 200 阅读 · 0 评论 -
leetcode-Day1-Array[35,66,119]
题目:Search Insert Position难度:Easy Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in ord...原创 2018-07-22 16:06:43 · 124 阅读 · 0 评论 -
c++ primer plus学习笔记
预备知识c++在c语言的基础上添加了面向对象编程和泛型编程c语言诞生的背景:贝尔实验室开发UNIX操作系统,需要一种高级语言代替汇编语言,避免在每台计算机上执行不同的汇编程序c语言编程的原理(强调的是算法)需要处理的概念——数据和算法结构化编程和自顶向下的编程方法,将程序不断划分成程序单元,便于阅读和管理面向对象编程:面向对象编程强调数据,用类描述特定的数据...原创 2018-07-21 17:06:41 · 842 阅读 · 0 评论 -
leetcode-DAY4-2018/7/25
待办: 1. set容器用法 2. 位运算题目:217. Contains Duplicate Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice...原创 2018-07-25 14:51:39 · 120 阅读 · 0 评论 -
leetcode-DAY3-2018.7.24
题目:27. Remove Element Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocate extra space for another array, you must do th...原创 2018-07-24 11:31:55 · 109 阅读 · 0 评论 -
leetcode-sort-easy-over
题目列表:349350242题目349:Intersection of Two Arrays 描述:Given two arrays, write a function to compute their intersection. 例子:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2]. Note: Each el...原创 2018-08-07 18:05:53 · 134 阅读 · 0 评论