xixi2


  • 首页

  • 关于

  • 标签

  • 分类

  • 归档

  • 搜索

494. Target Sum

发表于 2019-10-02 | 分类于 leetcode

You are given a list of non-negative integers, a1, a2, …, an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose one from + and - as its new symbol.

Find out how many ways to assign symbols to make sum of integers equal to target S.

阅读全文 »

703. Kth Largest Element in a Stream

发表于 2019-09-29 | 分类于 leetcode

Design a class to find the kth largest element in a stream. Note that it is the kth largest element in the sorted order, not the kth distinct element.

阅读全文 »

堆

发表于 2019-09-29

什么是堆

我们面临的第一个问题是:什么是堆?

堆可以定义为一颗二叉树,树的节点中包含键,并且满足两个条件:
1.该二叉树是完全二叉树.除了最后一层,树的每一层都是满的.
2.父母优势:(以最大堆为例)父节点的键大于或等于孩子节点的键

可以用数组来实现堆.

阅读全文 »

subSets

发表于 2019-09-29 | 分类于 leetcode
  1. Subsets

Given a set of distinct integers, nums, return all possible subsets (the power set).

Note: The solution set must not contain duplicate subsets.

阅读全文 »

linux常见文件格式

发表于 2019-09-29 | 分类于 linux基础

本文档整理并记录一些ubuntu系统常用文件的格式。

阅读全文 »

字符串基础知识总结

发表于 2019-09-29

有几种不同类型的字符串: c风格字符串(包括字符串字面常量和指向以空字符结尾的字符数组的指针),string类型(类类型)

阅读全文 »

unix 高级环境编程系列1

发表于 2019-09-27 | 分类于 unix 高级环境编程

此文档主要记录学习过程中出现的一些问题.

阅读全文 »

内置指针

发表于 2019-09-27 | 分类于 指针

什么是指针?
指针是一种特殊的变量.它的值是一个对象的地址,也称指针指向该对象.对指针进行解引用可以获取该对象.指针本身是一个对象,可以赋值和拷贝.

阅读全文 »

mysql常用命令

发表于 2019-09-27 | 分类于 数据库

本文档整理并记录常用的mysql命令.

阅读全文 »

move对效率的影响

发表于 2019-09-27 | 分类于 C++基础知识

下面自己实现了字符串类,命名为String.然后分为类实现移动构造函数(mctor)和移动赋值运算符函数(masgn).并且对比在该类有mctor和masgn与没有这两个函数时的效率差异.

阅读全文 »
1…111213…18
xixi2

xixi2

一去不复返的远方还有无法抵达的过去

175 日志
21 分类
107 标签
© 2019 xixi2
由 Hexo 强力驱动
|
主题 — NexT.Mist v5.1.4
访问人数 总访问量 次