Leetcode Solutions
Leetcode Solutions
Tuesday, November 1, 2016
[Leetcode]Sort Characters By Frequency
›
Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Input: "tree" Output: "e...
3 comments:
Sunday, October 23, 2016
[Leetcode] Path Sum III
›
You are given a binary tree in which each node contains an integer value. Find the number of paths that sum to a given value. The path...
[Leetcode] Find All Anagrams in a String
›
Given a string s and a non-empty string p , find all the start indices of p 's anagrams in s . Strings consists of lowe...
Friday, October 21, 2016
[Leetcode] Partition Equal Subset Sum
›
Given a non-empty array containing only positive integers , find if the array can be partitioned into two subsets such that the sum of ...
Thursday, October 20, 2016
[Leetcode] Pacific Atlantic Water Flow
›
Given an m x n matrix of non-negative integers representing the height of each unit cell in a continent, the "Pacific ocean" t...
1 comment:
[Leetcode] Battleships in a Board
›
Given an 2D board, count how many different battleships are in it. The battleships are represented with 'X' s, empty slots are re...
Wednesday, October 19, 2016
[Leetcode] Longest Repeating Character Replacement
›
Given a string that consists of only uppercase English letters, you can replace any letter in the string with another letter at most k ti...
›
Home
View web version