摘要: level 1 framework defination: bootstrap file structure: Adding bootstrp to our html: bootstrap relays on jquery, so we also need to add jquery inside 阅读全文
posted @ 2016-10-14 08:03 毛线刷题笔记 阅读(289) 评论(0) 推荐(0) 编辑
摘要: 基础1: partition Partition Array Given an array nums of integers and an int k, partition the array (i.e move the elements in "nums") such that: All elem 阅读全文
posted @ 2016-10-07 11:33 毛线刷题笔记 阅读(2404) 评论(0) 推荐(0) 编辑
摘要: N-Queens 模拟退火不会写 0.0 The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an i 阅读全文
posted @ 2016-10-06 01:04 毛线刷题笔记 阅读(691) 评论(0) 推荐(0) 编辑
摘要: First Missing Positive Given an unsorted integer array, find the first missing positive integer. For example,Given [1,2,0] return 3,and [3,4,-1,1] ret 阅读全文
posted @ 2016-10-05 01:00 毛线刷题笔记 阅读(380) 评论(0) 推荐(0) 编辑
摘要: level4 当我们需要打印多次product name 和product price的时候,我们要重复利用这2行代码 如果要传入string,那么用“” 里面包含‘’。利用ng-include 加载页面以后,用ajax call来拿到需要include的page 分割线 a better way 阅读全文
posted @ 2016-10-04 15:12 毛线刷题笔记 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 回溯法概念:回溯算法实际上一个类似枚举的搜索尝试过程,主要是在搜索尝试过程中寻找问题的解,当发现已不满足求解条件时,就“回溯”返回,尝试别的路径。 回溯法是一个既带有系统性又带有跳跃性的的搜索算法。它在包含问题的所有解的解空间树中,按照深度优先的策略,从根结点 出发搜索解空间树。算法搜索至解空间树的 阅读全文
posted @ 2016-10-04 08:17 毛线刷题笔记 阅读(5264) 评论(0) 推荐(1) 编辑
摘要: level 3 Forms and Models 如何添加和显示review? review内容作为product的内容的一部分!放在app.js文件里面 在html显示页面里面,增加一个循环来显示review的内容 我们如何把表单要填写的内容和我们要显示的内容进行绑定呢? 通过ng-model d 阅读全文
posted @ 2016-10-02 09:02 毛线刷题笔记 阅读(256) 评论(0) 推荐(0) 编辑
摘要: javascript 1. 转义字符 \\ 打印出来是\ \n 打印出来是回车 2. 比较string时候可以用 == 不像java比较的是2个指针了 哈哈 "A" == "B" 3. 变量定义及赋值 //to do ----------------------------------------- 阅读全文
posted @ 2016-10-02 06:32 毛线刷题笔记 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 1. min/max heap 看到K神马的基本上就是min/max heap. (1) Find the K closest points to the origin in a 2D plane, given an array containing N points. 1 public stati 阅读全文
posted @ 2016-10-01 12:51 毛线刷题笔记 阅读(308) 评论(0) 推荐(0) 编辑
摘要: 目录: 1. 一个数组从两边往中间移动(对撞型) 2. 一个数组同时向前移动(前向型) 3. 两个数组(并行型) 1. 对撞型/相会型指针 1. two sum, three sum, 4 sum, k sum 类 2.灌水类问题 1. sort colors Given an array with 阅读全文
posted @ 2016-09-29 02:39 毛线刷题笔记 阅读(295) 评论(0) 推荐(0) 编辑