随笔分类 - BFS
发表于 2019-03-22 21:37阅读:266评论:0推荐:0
摘要: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
阅读全文 »
发表于 2019-02-08 21:43阅读:231评论: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
阅读全文 »
发表于 2019-02-04 23:58阅读:256评论: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
阅读全文 »
发表于 2018-12-29 21:41阅读:408评论: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
阅读全文 »
发表于 2018-12-19 20:42阅读:241评论: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
阅读全文 »
发表于 2018-12-09 21:13阅读:202评论: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
阅读全文 »
发表于 2018-12-09 18:53阅读:182评论: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
阅读全文 »
发表于 2018-10-17 11:17阅读:175评论: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
阅读全文 »