# leetcode题解

## Learning Note of Go – Leetcode

Use of Channel

Longest Palindrome

Longest Substring Without Repeating Characters

Allocate space for slices. Use make. Allocate space for pointer, use new

Hash Map Note: using hash map

Two Sum Given an array of integers, return indices […]

## [leetcode] Coin Change2

322. Coin Change You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need to make up that amount. If that amount of money cannot be made up by any combination of the coins, […]

## [leetcode] 310. Minimum Height Trees

Minimum Height Trees For a undirected graph with tree characteristics, we can choose any node as the root. The result graph is then a rooted tree. Among all possible rooted trees, those with minimum height are called minimum height trees (MHTs). Given such a graph, write a function to find […]

## [leetcode] Range Sum Query 2D – Mutable1

Range Sum Query 2D – Mutable Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and lower right corner (row2, col2). The above rectangle (with the red border) is defined by (row1, col1) = (2, 1) and […]

## [leetcode]Range Sum Query – Mutable

Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. The update(i, val) function modifies nums by updating the element at index i to val. Example:

Note: The array is only modifiable by the update function. You may assume […]

## [lintcode] Topological Sorting

Topological Sorting Medium Topological SortingShow result 25% Accepted Given an directed graph, a topological order of the graph nodes is defined as follow: For each directed edge A -> B in graph, A must before B in the order list. The first node in the order can be any node […]