随笔分类 -  leetcode

摘要:给定两个单词(beginWord 和 endWord)和一个字典,找到从 beginWord 到 endWord 的最短转换序列的长度。转换需遵循如下规则: 每次转换只能改变一个字母。 转换过程中的中间单词必须是字典中的单词。 说明: 如果不存在这样的转换序列,返回 0。 所有单词具有相同的长度。 阅读全文
posted @ 2019-08-01 15:20 御心飞行 阅读(180) 评论(0) 推荐(0)
摘要:Given a collection of intervals, merge all overlapping intervals. Example 1: Input: [[1,3],[2,6],[8,10],[15,18]] Output: [[1,6],[8,10],[15,18]] Explan 阅读全文
posted @ 2019-01-18 16:38 御心飞行 阅读(292) 评论(0) 推荐(0)
摘要:In an alien language, surprisingly they also use english lowercase letters, but possibly in a different order. The order of the alphabet is some permu 阅读全文
posted @ 2019-01-17 21:15 御心飞行 阅读(223) 评论(0) 推荐(0)
摘要:Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex 阅读全文
posted @ 2019-01-16 16:40 御心飞行 阅读(109) 评论(0) 推荐(0)