### LeetCode 34：Find First and Last Position of Element in Sorted Array

Given an array of integers nums sorted in ascending order, find the starting and ending position of a given targetvalue.

Your algorithm’s runtime complexity must be in the order of O(log n).

If the ta[……]

### LeetCode 33：Search in Rotated Sorted Array

Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.

```(i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]).
```

You are given a target value to search. If found[……]

### LeetCode 32：Longest Valid Parentheses

Given a string containing just the characters `'('` and `')'`, find the length of the longest valid (well-formed) parentheses substring.

Example 1:

```Input: "(()"
Output: 2
Explanation: The longest valid pa[......]Read more```

### LeetCode 31：Next Permutation

Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.

If such arrangement is not possible, it must rearrange it as the lowest possible or[……]

### LeetCode 28：Implement strStr()

Implement strStr().

Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.

Example 1:

```Input: haystack = "hello", needle = "ll"
Output: 2
```

Example 2:

`I[......]Read more`