Skip to content

Commit 81ff7ed

Browse files
clean up
1 parent ccb48dd commit 81ff7ed

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ Your ideas/fixes/algorithms are more than welcome!
216216
|283|[Move Zeroes](https://leetcode.com/problems/move-zeroes/)|[Solution](../master/src/main/java/com/stevesun/solutions/MoveZeroes.java)| O(n)|O(1) | Easy|
217217
|282|[Expression Add Operators](https://leetcode.com/problems/expression-add-operators/)|[Solution](../master/src/main/java/com/stevesun/solutions/ExpressionAddOperators.java)| O(?)|O(?) | Hard|
218218
|281|[Zigzag Iterator](https://leetcode.com/problems/zigzag-iterator/)|[Solution](../master/src/main/java/com/stevesun/solutions/_281.java)| O(n)|O(n) | Medium|
219-
|280|[Wiggle Sort](https://leetcode.com/problems/wiggle-sort/)|[Solution](../master/src/main/java/com/stevesun/solutions/WiggleSort.java)| O(n)|O(1) | Medium|
219+
|280|[Wiggle Sort](https://leetcode.com/problems/wiggle-sort/)|[Solution](../master/src/main/java/com/stevesun/solutions/_280.java)| O(n)|O(1) | Medium|
220220
|279|[Perfect Squares](https://leetcode.com/problems/perfect-squares/)|[Solution](../master/src/main/java/com/stevesun/solutions/PerfectSquares.java)| O(n)|O(1) | Medium|
221221
|278|[First Bad Version](https://leetcode.com/problems/first-bad-version/)|[Solution](../master/src/main/java/com/stevesun/solutions/FirstBadVersion.java)| O(logn)|O(1) | Easy| Binary Search
222222
|277|[Find the Celebrity](https://leetcode.com/problems/find-the-celebrity/)|[Solution](../master/src/main/java/com/stevesun/solutions/FindtheCelebrity.java)| O(n)|O(1) | Medium|
@@ -236,7 +236,7 @@ Your ideas/fixes/algorithms are more than welcome!
236236
|258|[Add Digits](https://leetcode.com/problems/add-digits/)|[Solution](../master/src/main/java/com/stevesun/solutions/_258.java)| O(1)|O(1) | Easy|
237237
|257|[Binary Tree Paths](https://leetcode.com/problems/binary-tree-paths/)|[Solution](../master/src/main/java/com/stevesun/solutions/BinaryTreePaths.java) | O(n*h) | O(h) | DFS/Recursion
238238
|256|[Paint House](https://leetcode.com/problems/paint-house/)|[Solution](../master/src/main/java/com/stevesun/solutions/PaintHouse.java) | O(n) | O(1) | Medium| DP
239-
|255|[Verify Preorder Sequence in Binary Search Tree](https://leetcode.com/problems/verify-preorder-sequence-in-binary-search-tree/)|[Solution](../master/src/main/java/com/stevesun/solutions/VerifyPreorderSequenceinBinarySearchTree.java) | O(n) | O(h) | Medium| Tree
239+
|255|[Verify Preorder Sequence in Binary Search Tree](https://leetcode.com/problems/verify-preorder-sequence-in-binary-search-tree/)|[Solution](../master/src/main/java/com/stevesun/solutions/_255.java) | O(n) | O(h) | Medium| Tree
240240
|254|[Factor Combinations](https://leetcode.com/problems/factor-combinations/)|[Solution](../master/src/main/java/com/stevesun/solutions/FactorCombinations.java) | O(nlogn) | O(nlogn) | Medium| Backtracking
241241
|253|[Meeting Rooms II](https://leetcode.com/problems/meeting-rooms-ii/)|[Solution](../master/src/main/java/com/stevesun/solutions/_253.java) | O(nlogn) | O(h) | Medium| Heap
242242
|252|[Meeting Rooms](https://leetcode.com/problems/meeting-rooms/)|[Solution](../master/src/main/java/com/stevesun/solutions/MeetingRooms.java) | O(nlogn) | O(1) | Easy
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
Follow up:
1111
Could you do it using only constant space complexity?
1212
*/
13-
public class VerifyPreorderSequenceinBinarySearchTree {
13+
public class _255 {
1414

1515
public boolean verifyPreorder(int[] preorder) {
1616
int low = Integer.MIN_VALUE;

src/main/java/com/stevesun/solutions/WiggleSort.java renamed to src/main/java/com/stevesun/solutions/_280.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/** Given an unsorted array nums, reorder it in-place such that nums[0] <= nums[1] >= nums[2] <= nums[3]....
44
For example, given nums = [3, 5, 2, 1, 6, 4], one possible answer is [1, 6, 2, 5, 3, 4]*/
5-
public class WiggleSort {
5+
public class _280 {
66
public void wiggleSort(int[] nums) {
77
for(int i = 1; i < nums.length; i++){
88
if((i%2 == 0 && nums[i] > nums[i-1]) || (i%2 == 1 && nums[i] < nums[i-1])) swap(nums, i);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy