Leetcode - 8. 字符串转换整数 (atoi)
Tree
Leetcode - 912. sortArray
1 | //BuubleSort |
1 | //MergeSort |
1 | //Mergesort version 2.0 |
Leetcode面试0305 - stackSort
Problem Link
https://leetcode-cn.com/problems/sort-of-stacks-lcci/
Description
栈排序。 编写程序,对栈进行排序使最小元素位于栈顶。最多只能使用一个其他的临时栈存放数据,但不得将元素复制到别的数据结构(如数组)中。该栈支持如下操作:push、pop、peek 和 isEmpty。当栈为空时,peek 返回 -1。
Leetcode - Best Time to Buy and Sell Stock
Problem link
https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock/
Description
Say you have an array for which the ith element is the price of a given stock on day i.
If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the stock), design an algorithm to find the maximum profit.
Note that you cannot sell a stock before you buy one.
Leetcode-141.Linked List Cycle
Problem Link
https://leetcode-cn.com/explore/learn/card/linked-list/194/two-pointer-technique/744/
Description
Given a linked list, determine if it has a cycle in it.
Leetcode - Minimum Number of Steps to Make Two Strings Anagram
Problem Link
https://leetcode-cn.com/problems/minimum-number-of-steps-to-make-two-strings-anagram/
Description
Given two equal-size strings s and t. In one step you can choose any character of t and replace it with another character.
Return the minimum number of steps to make t an anagram of s.