随笔分类 - Affirm
摘要:Word Ladder I Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that: Onl
阅读全文
摘要:Add Two Numbers I You have two numbers represented by a linked list, where each node contains a single digit. The digits are stored in reverse order,
阅读全文
摘要:Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and put. get(key) - Get the
阅读全文
摘要:Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.
阅读全文
摘要:Given a boolean 2D matrix, find the number of islands. Notice 0 is represented as the sea, 1 is represented as the island. If two 1 is adjacent, we co
阅读全文
摘要:Design a data structure that supports the following two operations: addWord(word) andsearch(word) search(word) can search a literal word or a regular
阅读全文
摘要:For an array A, if i < j, and A [i] > A [j], called (A [i], A [j]) is a reverse pair.return total of reverse pairs in A. For an array A, if i < j, and
阅读全文
摘要:Two Sum I Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of
阅读全文

浙公网安备 33010602011771号