|
1 |
| -import leetcode.editor.en.Q1014.BestSightseeingPair; |
2 |
| -import leetcode.editor.en.Q1051.HeightChecker; |
3 |
| -import leetcode.editor.en.Q115.DistinctSubsequences; |
4 |
| -import leetcode.editor.en.Q1218.LongestArithmeticSubsequenceOfGivenDifference; |
5 |
| -import leetcode.editor.en.Q122.BestTimeToBuyAndSellStockIi; |
6 |
| -import leetcode.editor.en.Q1416.RestoreTheArray; |
7 |
| -import leetcode.editor.en.Q152.MaximumProductSubarray; |
8 |
| -import leetcode.editor.en.Q1548.TheMostSimilarPathInAGraph; |
9 |
| -import leetcode.editor.en.Q1567.MaximumLengthOfSubarrayWithPositiveProduct; |
10 |
| -import leetcode.editor.en.Q1639.NumberOfWaysToFormATargetStringGivenADictionary; |
11 |
| -import leetcode.editor.en.Q2218.MaximumValueOfKCoinsFromPiles; |
12 |
| -import leetcode.editor.en.Q2402.MeetingRoomsIii; |
13 |
| -import leetcode.editor.en.Q2607.MakeKSubarraySumsEqual; |
14 |
| -import leetcode.editor.en.Q2641.CousinsInBinaryTreeIi; |
15 |
| -import leetcode.editor.en.Q459.RepeatedSubstringPattern; |
16 |
| -import leetcode.editor.en.Q461.HammingDistance; |
17 |
| -import leetcode.editor.en.Q516.LongestPalindromicSubsequence; |
18 |
| -import leetcode.editor.en.Q63.UniquePathsIi; |
19 |
| -import leetcode.editor.en.Q646.MaximumLengthOfPairChain; |
20 |
| -import leetcode.editor.en.Q673.NumberOfLongestIncreasingSubsequence; |
21 |
| -import leetcode.editor.en.Q71.SimplifyPath; |
22 |
| -import leetcode.editor.en.Q727.MinimumWindowSubsequence; |
23 |
| -import leetcode.editor.en.Q740.DeleteAndEarn; |
24 |
| -import leetcode.editor.en.Q879.ProfitableSchemes; |
25 |
| -import leetcode.editor.en.Q946.ValidateStackSequences; |
| 1 | +import leetcode.editor.en.Q1752.CheckIfArrayIsSortedAndRotated; |
26 | 2 | import org.json.JSONArray;
|
27 | 3 | import org.json.JSONTokener;
|
28 | 4 |
|
29 | 5 | import java.io.IOException;
|
30 | 6 | import java.io.InputStream;
|
31 | 7 | import java.util.ArrayList;
|
32 |
| -import java.util.Arrays; |
33 | 8 | import java.util.LinkedList;
|
34 | 9 | import java.util.List;
|
35 | 10 |
|
36 | 11 |
|
37 | 12 | public class Main {
|
38 | 13 | public static void main(String[] args) throws IOException {
|
39 | 14 |
|
40 |
| - System.out.println(new LongestArithmeticSubsequenceOfGivenDifference().longestSubsequence(toIntArray("[7,-2,8,10,6,18,9,-8,-5,18,13,-6,-17,-1,-6,-9,9,9]\n"), 1)); |
| 15 | + System.out.println(new CheckIfArrayIsSortedAndRotated().check(toIntArray("[3,4,5,1,2]"))); |
41 | 16 |
|
42 | 17 | }
|
43 | 18 |
|
|
0 commit comments