最新文章列表

dfs题目这样去接题,秒杀leetcode题目

点个赞,看一看,好习惯!本文 GitHub https://github.com/OUYANGSIHAI/JavaInterview 已收录,这是我花了 3 个月总结的一线大厂 Java 面试总结,本人已拿大厂 offer。 另外,原创文章首发在我的个人博客:blog.ouyangsihai.cn,欢迎访问。 今天来聊聊 dfs 的解题方法,这些方法都是总结之后的出来的经验,有值得借鉴的 ...
SIHAIloveYAN 评论(0) 有641人浏览 2020-06-22 09:06

FastDFS+nginx 实现http服务

上一篇已经已经介绍了如何安装fastdfs,这一篇我们就来讲讲通过整合nginx实在http访问的功能。 官方nginx:http://nginx.org/download/nginx-1.10.2.tar.gz淘宝tengine:http://tengine.taobao.org/download/tengine-2.1.2.tar.gz 淘宝tengine是淘宝团队在官方版基础上修改 ...
dfs 
y806839048 评论(0) 有329人浏览 2019-09-09 14:45

文件服务器防盗链--FastDFS+nginx

fastdfs的访问控制          1,设置token   2, 用http_reffer 防止盗链  nginx+fastdfs      fastdfs文件服务器      nginx实现fastdfs通过url访问---此时可以设置location拦截特征,防盗链能访问有关     前言:Nginx 是一个很牛的高性能Web和反向代理服务器, 它具有有很多非常优 ...
dfs 
y806839048 评论(0) 有558人浏览 2019-09-09 14:21

nyoj306 dfs+二分搜索

题目大意:中文题。 算法思路:这种思路确实对我来说很新颖,我也是看了解题报告才知道。说白了,二分最小值和最大值的差,如果这个差值能够从起点走到终点,则说明这个差值是可行的,那我们就在减小,二分左半部分,否则二分右半部分。 #include<iostream> #include<cstring> #include<cstdio> using nam ...
huyifan951124 评论(0) 有625人浏览 2016-10-05 10:15

Longest Increasing Path in a Matrix

Given an integer matrix, find the length of the longest increasing path. From each cell, you can either move to four directions: left, right, up or down. You may NOT move diagonally or move outside of ...
KickCode 评论(0) 有762人浏览 2016-02-29 05:56

Number of Islands

Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume ...
DFS 
KickCode 评论(0) 有316人浏览 2016-02-18 03:32

Binary Tree Right Side View

Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. For example: Given the following binary tree,    1        ...
KickCode 评论(0) 有517人浏览 2016-02-18 02:51

Surrounded Regions

Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'. A region is captured by flipping all 'O's into 'X's in that surrounded region. For example, X X X X X O O X X X O X X O ...
KickCode 评论(0) 有511人浏览 2016-02-12 02:56

Path Sum

Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. For example: Given the below binary tree and sum = ...
KickCode 评论(0) 有242人浏览 2016-02-09 04:34

Word Search

Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or ver ...
KickCode 评论(0) 有869人浏览 2016-02-03 02:50

【数据结构】【图论】DFS

      DFS(Depth-First-Search),中文名称为“深度优先搜索”,是纵向遍历图的一种递归算法。       需求:输入edgeCount、startNode,然后输入edgeCount组数据,每组数据有两个数node1与node2,表示一条无向边,最后使用DFS算法输出遍历图的结果,数和数之间使用空格隔开。 一、Java代码 import java.util.Scan ...
狂盗一枝梅 评论(0) 有627人浏览 2016-01-23 13:16

Java Swing游戏围曹操,类围游戏

近期,为了帮同学完成论文中的益智游戏小项目,昨天晚上下班后,八点开始,一直熬夜到三点的时间仿照《围猫》这个游戏做了一个《围曹操》的益智游戏,熬夜真不好啊,现在俩眼皮打盹,要死了,,, 其实大约一点的时候,编码完成,调bug调了两个小时啊。。又困又得坚持。。疯了。。。。。 先说说这个小游戏,技术上就是java swing,好久没用过了,边网上搜,边写,略不爽。。。。 先玩了玩围猫这个游戏,总 ...
武林第一帅哥 评论(0) 有867人浏览 2015-12-10 16:45

DFS 模板

#include<cstdio> #include<cstring> #define MAXN 1000 int map[MAXN][MAXN]; bool visit[MAXN][MAXN]; int n,m; int dir[4][2]={{1,0},{-1,0},{0,1},{0,-1}}; void DFS(int x, int y) { ...
hellojyj 评论(0) 有722人浏览 2014-11-25 08:59

HDU 1016 Prime Ring Problem

原题传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1016     Prime Ring Problem Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 25493    Accept ...
hellojyj 评论(0) 有700人浏览 2014-07-15 16:44

【百度之星2014~复赛)解题报告】The Query on the Tree

声明    笔者最近意外的发现 笔者的个人网站 http://tiankonguse.com/ 的很多文章被其它网站转载,但是转载时未声明文章来源或参考自 http://tiankonguse.com/ 网站,因此,笔者添加此条声明。     郑重声明:这篇记录《 【百度之星2014~复赛)解题报告】The Query on the Tree》转载自 http://tiankonguse.co ...
tiankonguse 评论(0) 有1103人浏览 2014-06-02 12:27

【FastDFS专题】fastdfs使用实战(使用篇)

经过前面的安装、配置、启动工作,现在就可以看到FastDFS的效果了,试着上传一个文件,然后再通过http下载。后面一篇将介绍怎样使用Java的API来上传、获取、删除文件。 一、上传文件    FastDFS安装包中,自带了客户端程序,通过程序可以进行文件上传。在使用这个客户端程序之前,首先需要配置client.conf,然后再进行文件上传及下载。 1、修改client.conf文件,修改如下 ...
Josh_Persistence 评论(0) 有1967人浏览 2014-05-13 22:26

【FastDFS专题】fastdfs使用实战(安装篇)

目前FastDFS支持类Unix系统,在Linux和FreeBSD下测试过,本文使用的是CentOS5.5,建议安装之前先了解一下FastDFS的原理,这对后面配置部分有帮助:http://josh-persistence.iteye.com/blog/2065510   一、安装libevent     FastDFS 内部绑定了 libevent 作为 http 服务器 ,在V2.X版 ...
Josh_Persistence 评论(0) 有2409人浏览 2014-05-12 20:29

FastDFS专题】fastdfs使用实战(概念篇)

1、FastDFS是什么    FastDFS是一个开源的轻量级分布式文件系统,纯C实现,支持Linux、FreeBSD等UNIX系统,FastDFS可以看做是基于文件的key value pair存储系统。    FastDFS有两个角色:跟踪器(tracker)和存储节点(storage)。跟踪器主要做调度工作,在访问上起负载均衡的作用。存储节点存储文件,完成文件管理的所有功能:存储、同步和 ...
Josh_Persistence 评论(0) 有4731人浏览 2014-05-12 19:41

初次使用fast dfs 遇到的问题记录

开发过程使用fastdfs,第一次接触,使用时遇到的问题整理如下 问题1: 在centos上安装 ./make.sh 时报错如下: 在包含自 tracker_service.c:34 的文件中: tracker_nio.h:17:19: 错误:event.h:没有那个文件或目录 In file included from tracker_nio.h:18, ...
dfs 
jingtao416 评论(0) 有17295人浏览 2014-03-20 21:26

Directed Graph

1.  Digraph: Set of vertices connected pairwise by directed edges.   2.  Digraph applications :   3.  Some digraph problems:     --  Path: Is there a directed path from s to t ?     --  Shortes ...
leonzhx 评论(0) 有1053人浏览 2013-11-22 20:54

最近博客热门TAG

Java(141744) C(73651) C++(68608) SQL(64571) C#(59609) XML(59133) HTML(59043) JavaScript(54919) .net(54785) Web(54514) 工作(54118) Linux(50905) Oracle(49875) 应用服务器(43289) Spring(40812) 编程(39454) Windows(39381) JSP(37542) MySQL(37267) 数据结构(36424)

博客人气排行榜

    博客电子书下载排行

      >>浏览更多下载

      相关资讯

      相关讨论

      Global site tag (gtag.js) - Google Analytics