原创 【Leetcode Algorithm】Remove Duplicates from Sorted Array

Given a sorted array, remove the duplicates in place such that each element appear only once and return the new lengt

原创 【Leetcode Algorithm】Implement strStr()

Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of

原创 【Leetcode Algorithm】Invert Binary Tree

Invert a binary tree. 4 / \ 2 7 / \ / \ 1 3 6 9 to 4 / \ 7 2 / \ / \ 9 6 3

原创 【Leetcode Algorithm】Valid Sudoku

Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules. The Sudoku board could be partially filled,

原创 【Leetcode Algorithm】Remove Element

Given an array and a value, remove all instances of that value in place and return the new length. The order of eleme

原创 【Leetcode Algorithm】Happy Number

Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: