CNoodle
  • Home
  • Archives
  • Tags
  • About

[LeetCode] 242. Valid Anagram

Given two strings s and t, return true if t is an anagram of s, and false otherwise. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all
2019-10-10
#leetcode #java #javascript #array #counting sort

[LeetCode] 128. Longest Consecutive Sequence

Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence. You must write an algorithm that runs in O(n) time. Example 1:Input: nums = [100,4,200,1,
2019-10-09
#leetcode #java #javascript #array #hashmap #LIS

[LeetCode] 334. Increasing Triplet Subsequence

Given an integer array nums, return true if there exists a triple of indices (i, j, k) such that i < j < k and nums[i] < nums[j] < nums[k]. If no such indices exists, return false. Example
2019-10-09
#leetcode #java #javascript #array #LIS #selection sort

[LeetCode] 7. Reverse Integer

Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-231, 231 - 1], then return 0. Assume the environment
2019-10-09
#leetcode #java #javascript #math

[LeetCode] 1. Two Sum

Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.You may assume that each input would have exactly one solution, and you may not
2019-10-08
#leetcode #java #javascript #array #hashmap #two sum #two pointer
1…424344

Search

Hexo Fluid