2018年4月1日
摘要: 1,尽量避免双重循环,利用排序等方法尽量单层循环 2,数字范围很大时,思索数字规律。 阅读全文
posted @ 2018-04-01 20:49 米兰达莫西 阅读(149) 评论(0) 推荐(0) 编辑
  2018年3月23日
摘要: 排序总结 1, 直接插入排序 将序列中的数一个一个插入新的序列, 平均时间复杂度为O(n^2),最好O(n),最坏O(n^2) 空间复杂度O(1) 2, 希尔排序 缩小增量排序,增量不好确定. 平均时间复杂度O(n^1.5),最好O(n),最坏O(n^2) 空间复杂度为O(1) 3, 冒泡排序 逐个 阅读全文
posted @ 2018-03-23 12:00 米兰达莫西 阅读(107) 评论(0) 推荐(0) 编辑
  2018年3月17日
摘要: 1,sizeof,对以下求sizeof的结果是什么 空类型,为1 添加构造函数和析构函数之后,为1 析构函数标记为虚函数,为,32位为4,64位为8. 2,C++标准里不允许复制构造函数传值参数。 3,空间换时间:hash表 时间换空间:二分查找(有序表),排序 阅读全文
posted @ 2018-03-17 11:49 米兰达莫西 阅读(118) 评论(0) 推荐(0) 编辑
  2018年3月15日
摘要: Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. Given an integer, convert it to a roman nu 阅读全文
posted @ 2018-03-15 11:49 米兰达莫西 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 对于系统来说类似于实模式、保护模式。 这种模式面向系统固件。 他提供了一个比较清楚,容易孤立的环境。 Spec中形容该模式的特性时用的词是“透明”,在后面的学习中应该可以了解其含义。 SMM模式通过调用SMI进入,进入之后,SMI就会disable,不过系统会暂存一个且只有一个SMI,当SMM模式退 阅读全文
posted @ 2018-03-15 11:32 米兰达莫西 阅读(3511) 评论(0) 推荐(0) 编辑
  2018年3月14日
摘要: Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 水题一枚,注意搞清楚规则,注意空间分配 class Solution { publi 阅读全文
posted @ 2018-03-14 12:09 米兰达莫西 阅读(115) 评论(0) 推荐(0) 编辑
摘要: SMBIOS的内容在物理地址000F0000h到000FFFFFh之间,想要访问SMBIOS,需要在32-bit 或 64-bit protected-mode之下。 在一个EFI系统中,SMBIOS Entry Point structure类似于EFI Configuration Table的布 阅读全文
posted @ 2018-03-14 10:04 米兰达莫西 阅读(7226) 评论(0) 推荐(0) 编辑
摘要: 在c++中,vector是一个十分有用的容器。 作用:它能够像容器一样存放各种类型的对象,简单地说,vector是一个能够存放任意类型的动态数组,能够增加和压缩数据。 vector在C++标准模板库中的部分内容,它是一个多功能的,能够操作多种数据结构和算法的模板类和函数库。 特别注意: 使用vect 阅读全文
posted @ 2018-03-14 09:54 米兰达莫西 阅读(190) 评论(0) 推荐(0) 编辑
  2018年3月13日
摘要: Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only 阅读全文
posted @ 2018-03-13 21:39 米兰达莫西 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 一,基础 1, 二叉树 (1) 第i层上至多有2^(i-1)个结点 (2) 深度为k的二叉树至多有2^k – 1个结点 (3) 对于任意一颗二叉树,终端结点数为n0,度为2的节点数为n2,n0 = n2 + 1 (4) 深度为k且有2^k-1个结点,为满二叉树 (5) 完全二叉树 2,二叉搜索树 左 阅读全文
posted @ 2018-03-13 15:11 米兰达莫西 阅读(362) 评论(0) 推荐(0) 编辑