自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(27)
  • 收藏
  • 关注

转载 Project Index

Sorry about the redirection.The failure of the Mix server has made all my projects disappear. So I made this temporary content sheet on my ...

2018-03-24 14:10:00 511

转载 Algorithm - Line up Soldiers

#include <cstdio> #include <queue> #include <vector> #define MAX 30 using namespace std; int inDegree[MAX]; ...

2018-02-06 05:45:00 136

转载 Leetcode - Largest Rectangle in Histogram

This is the anwser from others, which basically is using a stack to store the indices of the array elements who are greater than the element whose ...

2018-02-06 05:10:00 87

转载 Leetcode - Combination Sum

Combination Sum Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums t...

2018-01-11 23:28:00 69

转载 LeetCode - Find minimum time to finish jobs in constraints

非常值得看的一题啦!和MIT Quiz中的那个network flow题(Maze Marathonor,在Algorithm - Network Flow那篇博客里)过程很相似,过程都是: 1. 算出个最长的可能时间maxTime。 2. 设计个boolean isPossible(k)...

2017-12-14 11:52:00 169

转载 LeetCode - Number of Islands

想法真的太棒了!每次遇到“1”时,代表碰到了岛,于是执行DFSMarking,每次执行DFSMarking的时候就把一整个“岛”给消除,消除的过程很经典,多看看多理解理解啊! Given a 2d grid map of'1's (land) and'0's (water), count...

2017-12-14 11:29:00 99

转载 Algorithm - Network Flow

1. 判断题一道 2. 然后是这道超赞的题 这道题其实分成了好几道小题,其实是在间接引导你解题: 1.如果告诉你这个maze(graph)就是一条直线 O->O->O->...->O,且每条边的capacity是1,请问让所有人员都走出迷宫需要几晚上...

2017-12-14 11:22:00 243

转载 LeetCode - LongestPalinSubstr和longestPalinSubseq

class longestPalinSubstr{ public static void main(String[] args){ String s = "hahGeeks4"; int l = new longestPalinSubstr().longestPalinSubstr(...

2017-12-13 05:02:00 62

转载 LeetCode - Trapping Rain Water

class Solution { public int maxArea(int[] height) { int n = height.length; int left = 0; int right = n-1; ...

2017-12-12 11:05:00 69

转载 Algorithm - Sorting a partially sorted List

给定一个list,里面每个元素都是partially sorted的,所谓partially sorted的意思是说,每个元素距离他们sorted好后的位置在一定范围[0,k]内 set i=n-2k; while i>=0: sort [i, i+2k] range ...

2017-12-12 06:06:00 152

转载 Algorithm - Longest Common Substring

需要注意的是 longest common substring / longest common sequence的区别,按理说substring要简单得多。 Given: list A, list B递归关系:S[i][j]: 代表longest common substring wh...

2017-12-12 04:43:00 57

转载 Algorithm - Find k-th order element in a list (课堂笔记)

课上讲的是找unsorted list中的中位数,这里换成了kth-order elements;时间复杂度为O(n) FindKthElement( unsortedList, k ):// select pivot;randomly select a pivot m ...

2017-12-12 02:48:00 211

转载 Algorithm - 错题复习 midterm1&2

Midterm #1没什么好说的。。 1. 如果图是unweighted的,那么直接用BFS就能找shortest path,Dijkstra那些都是用在有权图中的。 2. 如果是unweighted & undirected图,那么BFS一次,可以把所有的vertex分成几个la...

2017-12-10 03:58:00 158

转载 LeetCode - Find All Duplicates in an Array

Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements that appear...

2017-12-09 01:31:00 96

转载 NP / NP-Hard / NP-Complete

https://www.cnblogs.com/Gavin_Liu/archive/2011/05/04/2012284.html 证明一个问题Q是NPC问题: 1. 证明Q是NP: 给出certificate,证明能在poly-time内examine这个certificate...

2017-12-07 21:57:00 147

转载 Algorithm - Network Flow复习

network flow的应用: 1. bipartite matching problem。(employee和job的分配匹配问题) - 构建bipartite图,添加s,t。 - 看问题中变量的意义,决定图中各边的capacity。(有点玄学) - 算ma...

2017-12-04 11:12:00 200

转载 LeetCode - Edit Distance

Geeks4Geeks链接:http://www.geeksforgeeks.org/dynamic-programming-set-5-edit-distance/ --------------------------------------------------------------...

2017-11-27 14:03:00 88

转载 LeetCode - Coin Change

Geeks4Geeks链接:http://www.geeksforgeeks.org/dynamic-programming-set-7-coin-change/ ----------------------------------------------------------------...

2017-11-27 05:50:00 102

转载 LeetCode - Generate Parentheses

package GenerateParentheses;import java.util.ArrayList;/* GIVEN: A Int represents the number of pairs of "(" and ")" we have. * RETURNS: All ...

2017-11-11 00:10:00 74

转载 LeetCode - LongestValidParentheses

package LongestValidParenthses;import java.util.Stack;/* * GIVEN: A string contains only "(" and ")" * RETURNS: A int represents the length of ...

2017-11-10 09:10:00 71

转载 Algorithm - <List> Intro - Sequence/Linked

Sequence List: #include <stdio.h>#include <stdlib.h>#define LISTSIZE 100#define LIST_INCREMENT 10#define FAILED -1#define OK...

2017-08-16 11:45:00 114

转载 Git learning

# .gitignore reference: https://github.com/github/gitignore -------------------------------------------------------------- before push: 1....

2017-06-15 10:30:00 123

转载 ML - tf.cifar10_input.py

Some places to notice: In method read_cifar10(filename_queue); 1. tf.train.string_input_producer(filenames); Explain: where 'filenames' is t...

2017-05-08 11:25:00 75

转载 JNIEnv基本概念解析

jni必读:http://blog.csdn.net/freechao/article/details/7692239 JNI为JAVA NATIVE INTERFACE,所以通过JNI不仅是能在JAVA平台使用C/C++的本地代码,还能在C/C++平台使用JAVA本地代码。 我目前只在意...

2016-12-08 21:44:00 182

转载 Ubuntu - CUDA安装的问题

问题来源:想使用gpu辅助darknet和opencv-3.1.0,所以必须安装cuda,下载的是cuda8.0的.deb(local) 版本安装文件,接下来遇到问题。 ********** 我的电脑是dell inspiron,双显卡:intel / nvidia geforce G95...

2016-12-02 14:01:00 74

转载 opencv: 训练分类器

opencv的分类器表示是一个.xml文件,里面相当于包含了传统意义上的weights文件。 过程: 1-准备负样本,产生negative_sample_description.dat $ find <path of negative samples> -name '*.jp...

2016-11-16 23:33:00 110

转载 opencv4android --- android studio上的face_detection过程记录

上个星期至今算是对opencv从零起步吧,而且没有C++的基础,做的挺辛苦,以下是自己的过程中自己的步骤和理解,如果有过opencv安卓端开发经验的高手们看到有什么不对的理解或做法,希望你们一定纠正我的错误,谢谢! --------×--------×--------×--------×--...

2016-11-10 16:26:00 145

空空如也

空空如也

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

TA关注的人

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