自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

lishichengyan的博客

总结和分享

  • 博客(10)
  • 收藏
  • 关注

原创 【dp经典问题】72. Edit Distance

原题在这里:点击打开链接Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You have the following 3 operations permitted on...

2018-03-29 14:21:58 229

原创 【回溯】22. Generate Parentheses

Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:[ "((()))", "(()())", "(())()", "()(())", "...

2018-03-29 13:22:31 138

原创 【位运算】136. Single Number

Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without using extra mem...

2018-03-28 20:15:44 143

原创 记一次愚蠢的写代码经历

Leetcode上有道题:点击打开链接20. Valid ParenthesesGiven a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the correct ord...

2018-03-28 18:35:40 202

原创 文法分析

1、递归下降语法分析(RDP)我们知道,对于一个CFG而言,不管规则多么复杂,规则集中总是会有非终结符到终结符的简单推导,就像递归中的出口一样。例如:这样的特点是递归下降法能够顺利执行递归的基本条件。RDP做的事情就是把每个非终结符看作是函数,从这个非终结符推导出的规则是函数体。例如:可以看到,函数体内部的书写范式是:case 终结符{eat(终结符);处理下一个;}RDP是一种预测分析,预测的意...

2018-03-25 20:34:57 4365

原创 React学习:组件生命周期、组件间数据传递

注:本篇文章仅供个人日后复习,所以没什么干货,只起类似“备忘录”的作用。最近,在看《深入浅出React和Redux》,目前到第二章了,这是本章代码:(1)counter.jsimport React, { Component } from 'react';import PropTypes from 'prop-types';const buttonStyle = { margin: ...

2018-03-22 22:31:18 342 1

原创 【opengl复习】显示框架

在上周昆大神的图形学研究进展,害怕跟不上特地来复习一波opengl1、显示框架:/**************************************************************Project Name:*Description: *Author: lishichengyan*Student ID:*Date:*Reference:http://www.li...

2018-03-12 22:54:12 209

翻译 flex使用手册翻译

原文网址在这里,一些我认为不重要的部分就略了。大部分是google翻译(毕竟一句一句慢慢看好再翻还是很累的好吧TAT),绝不代表本人的水平(滑稽.jpg)。不恰当的地方欢迎指正,也欢迎补充剩下的“略”。————————————————————————(我是萌萌哒昏割线)名称flex - fast lexical analyzer generator(快速词法分析生成工具)。概要flex [-bcd...

2018-03-11 17:25:06 5315 1

原创 Ubuntu安装flex和bison

在学习虎书,第二章练习要用lex和yacc,然而作者提供的网址上放的是flex和bison,当然这样更好啦(flex和bison完全兼容lex和yacc)。考虑到在windows下用这两个玩意还要安装masm,所以最后决定上虚拟机(之前操作系统课就装过了,幸亏没卸载哈哈哈)。Ubuntu下使用sudo apt-get install flex bison命令,不一会就装好了,如图:然后写了一个测试...

2018-03-10 20:29:48 40775 4

原创 SICP读书笔记:牛顿法求平方根

这个例子向我们展示了一个过程是怎么一步步被抽象和构建的,代码如下:#lang racket;; get the square of x(define (square x)(* x x));; get the absolute value of x(define (abs x)(if(< x 0)(- x)x));; calculate the square root of x...

2018-03-03 20:18:44 391

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除