随笔分类 -  BFS

摘要:An undirected, connected graph of N nodes (labeled 0, 1, 2, ..., N-1) is given as graph. graph.length = N, and j != i is in the list graph[i] exactly 阅读全文 »
posted @ 2019-03-22 21:37 Veritas_des_Liberty 阅读(266) 评论(0) 推荐(0) 编辑
摘要:Given a string S, we can transform every letter individually to be lowercase or uppercase to create another string. Return a list of all possible stri 阅读全文 »
posted @ 2019-02-08 21:43 Veritas_des_Liberty 阅读(231) 评论(0) 推荐(0) 编辑
摘要:Given two words (beginWord and endWord), and a dictionary's word list, find all shortest transformation sequence(s) from beginWord to endWord, such th 阅读全文 »
posted @ 2019-02-04 23:58 Veritas_des_Liberty 阅读(256) 评论(0) 推荐(0) 编辑
摘要:We are given a 2-dimensional grid. "." is an empty cell, "#" is a wall, "@" is the starting point, ("a", "b", ...) are keys, and ("A", "B", ...) are l 阅读全文 »
posted @ 2018-12-29 21:41 Veritas_des_Liberty 阅读(408) 评论(0) 推荐(0) 编辑
摘要:You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k. Define a pair (u,v) which consists of one element from th 阅读全文 »
posted @ 2018-12-19 20:42 Veritas_des_Liberty 阅读(241) 评论(0) 推荐(0) 编辑
摘要:Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. Note: A leaf is a node with no children. Exampl 阅读全文 »
posted @ 2018-12-09 21:13 Veritas_des_Liberty 阅读(202) 评论(0) 推荐(0) 编辑
摘要:Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest l 阅读全文 »
posted @ 2018-12-09 18:53 Veritas_des_Liberty 阅读(182) 评论(0) 推荐(0) 编辑
摘要:Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maxim 阅读全文 »
posted @ 2018-10-17 11:17 Veritas_des_Liberty 阅读(175) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示