欢迎fork and star:Nowcoder-Repository-github 123. Best Time to Buy and Sell Stock III 题目 Say you have an array f…
分类:LeetCode
[LeetCode] Reverse Vowels of a String 翻转字符串中的元音字母
Write a function that takes a string as input and reverse only the vowels of a string. Example 1:Given …
LeetCode | Max Points on a Line
题目: Given n points on a 2D plane, find the maximum number of points that lie on the same straight …
LeetCode | Insertion Sort List
题目: Sort a linked list using insertion sort. 思路: 常规的插入排序,直接上代码。 代码: /** * Definition for singly-linked list. *…
LeetCode | Restore IP Addresses
题目: Given a string containing only digits, restore it by returning all possible valid IP address combinations.…
[LintCode][Trie] Add and Search Word
Problem Design a data structure that supports the following two operations: addWord(word) and search(word) sea…
Leetcode 68. Text Justification
Given an array of words and a length L, format the text such that each line has exactly L characters and is fu…
LeetCode刷题之Remove Duplicates from Sorted List II
Problem Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct number…
[LeetCode By Go 3]561. Array Partition I
题目 Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), …
[LeetCode By Go 64]405. Convert a Number to Hexadecimal
题目 Given an integer, write an algorithm to convert it to hexadecimal. For negative integer, two’s complement m…
[LeetCode] Paint House 粉刷房子
There are a row of n houses, each house can be painted with one of the three colors: red, blu…
[LeetCode] Convert BST to Greater Tree 将二叉搜索树BST转为较大树
Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST …