bfs
文章平均质量分 54
A_bigUncle
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
跳格子
跳格子标签(空格分隔): bfsDescriptionWx最近在玩一个跳格子的游戏,游戏的规则如下:给出n个格子,每个格子有一个数字x,代表在该位置可以向右跳0-x步,现在Wx需要算出最少的跳跃次数,从最左边的格子跳到最右边的格子,输出跳跃的次数,若跳不到,则输出-1.Intput输入一个t,表示有t组测试数据 对于每组测试数据读入一个n表示格子的个数(2 <=n<=20), 下面一行n个数,原创 2017-05-15 19:46:12 · 1856 阅读 · 0 评论 -
迷宫问题 BFS
迷宫(BFS)标签: 算法 题目描述You are provided a maze(迷宫), and you need to program to find the least steps to walk from the start to the end.And you can only walk in four directions:up, down,left, right. There wi原创 2017-05-15 13:47:39 · 466 阅读 · 0 评论 -
[Week 5] LeetCode 854. K-Similar Strings
LeetCode 854. K-Similar Strings问题描述:Strings A and B are K-similar (for some non-negative integer K) if we can swap the positions of two letters in A exactly K times so that the resulting string equa...原创 2018-10-07 19:26:00 · 574 阅读 · 0 评论
分享