原创 [Leetcode]#166 Fraction to Recurring Decimal
Given two integers representing the numerator and denominator of a fraction, return the fraction in string format.
原创 [Leetcode]#125 Valid Palindrome
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For e
原创 [Leetcode]#86 Partition List
Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or e
原创 [Leetcode]#165 Compare Version Numbers
Compare two version numbers version1 and version2. If version1 > version2 return 1, if version1 < version2 return
原创 [Leetcode]#78 Subsets
Given a set of distinct integers, nums, return all possible subsets. Note: Elements in a subset must be in non-desc
原创 [Leetcode]#69 Sqrt(x)
//#69 Sqrt(x) //8ms 100% class Solution { public: int mySqrt(int x) { //x is guarantted to be vali
原创 [Leetcode]#119 Pascal's Triangle II
Given an index k, return the kth row of the Pascal’s triangle. For example, given k = 3, Return [1,3,3,1]. Note:
原创 [Leetcode]#92 Reverse Linked List II
Reverse a linked list from position m to n. Do it in-place and in one-pass. For example: Given 1->2->3->4->5->NULL
原创 [Leetcode]#147 Insertion Sort List
//#147 Insertion Sort List //80ms 81.07% #include <iostream> using namespace std; /** * Definition for singly-li
原创 [Leetcode]#83 Remove Duplicates from Sorted List
Given a sorted linked list, delete all duplicates such that each element appear only once. For example, Given 1->1
原创 [Leetcode]#82 Remove Duplicates from Sorted List II
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the or
原创 [Leetcode]#74 Search a 2D Matrix
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties
原创 [Leetcode]#160 Intersection of Two Linked Lists
Write a program to find the node at which the intersection of two singly linked lists begins. For example, the foll
原创 [Leetcode]#118 Pascal's Triangle
Given numRows, generate the first numRows of Pascal’s triangle. For example, given numRows = 5, Return [ [1]
原创 [Leetcode]#136 Single Number
Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm