diff --git a/11-integer-to-english-words.md b/11-integer-to-english-words.md new file mode 100644 index 0000000..6c383e7 --- /dev/null +++ b/11-integer-to-english-words.md @@ -0,0 +1,3 @@ +## Integer to English Words + +Given a non-negative integer `num`, convert it to its English words representation. diff --git a/12-shortest-palindrome.md b/12-shortest-palindrome.md new file mode 100644 index 0000000..684d3e2 --- /dev/null +++ b/12-shortest-palindrome.md @@ -0,0 +1,3 @@ +## Shortest Palindrome + +Given a string `s`, convert it into a palindrome by adding characters only at the front of the string. Return the shortest palindrome that can be formed by this transformation. diff --git a/13-create-maximum-number.md b/13-create-maximum-number.md new file mode 100644 index 0000000..c210835 --- /dev/null +++ b/13-create-maximum-number.md @@ -0,0 +1,7 @@ +## Create Maximum Number + +You are given two integer arrays `nums1` and `nums2` of lengths `m` and `n` respectively. These arrays represent the digits of two numbers. You are also given an integer `k`. + +Your task is to create the maximum number of length `k` (where `k ≤ m + n`) by selecting digits from the two arrays. The relative order of the digits from the same array must be preserved. + +Return an array of the `k` digits representing the maximum number. diff --git a/14-self-crossing.md b/14-self-crossing.md new file mode 100644 index 0000000..d870785 --- /dev/null +++ b/14-self-crossing.md @@ -0,0 +1,5 @@ +## Self Crossing + +You are given an array of integers `distance`. You start at the point (0, 0) on an X-Y plane, and you move `distance[0]` meters to the north, then `distance[1]` meters to the west, `distance[2]` meters to the south, `distance[3]` meters to the east, and so on. After each move, your direction changes counter-clockwise. + +Return `true` if your path crosses itself, or `false` if it does not. diff --git a/15-number-of-digit-one.md b/15-number-of-digit-one.md new file mode 100644 index 0000000..e6676fe --- /dev/null +++ b/15-number-of-digit-one.md @@ -0,0 +1,3 @@ +## Number of Digit One + +Given an integer `n`, count the total number of digit `1` appearing in all non-negative integers less than or equal to `n`. diff --git a/16-first-missing-positive.md b/16-first-missing-positive.md new file mode 100644 index 0000000..deee24a --- /dev/null +++ b/16-first-missing-positive.md @@ -0,0 +1,5 @@ +## First Missing Positive + +Given an unsorted integer array `nums`, return the smallest positive integer that is not present in `nums`. + +You must implement an algorithm that runs in O(n) time and uses O(1) auxiliary space. diff --git a/17-median-of-two-sorted-arrays.md b/17-median-of-two-sorted-arrays.md new file mode 100644 index 0000000..86a080d --- /dev/null +++ b/17-median-of-two-sorted-arrays.md @@ -0,0 +1,5 @@ +## Median of Two Sorted Arrays + +Given two sorted arrays `nums1` and `nums2` of size `m` and `n` respectively, return the median of the two sorted arrays. + +The overall run time complexity should be O(log(m + n)). diff --git a/18-word-search-II.md b/18-word-search-II.md new file mode 100644 index 0000000..61d63a8 --- /dev/null +++ b/18-word-search-II.md @@ -0,0 +1,5 @@ +## Word Search II + +Given an `m x n` board of characters and a list of strings `words`, return all words that can be found on the board. + +Each word must be constructed from letters of sequentially adjacent cells, where adjacent cells are horizontally or vertically neighboring. The same letter cell may not be used more than once in a word. diff --git a/19-find-the-closest-palindrome.md b/19-find-the-closest-palindrome.md new file mode 100644 index 0000000..9e0e241 --- /dev/null +++ b/19-find-the-closest-palindrome.md @@ -0,0 +1,5 @@ +## Find the Closest Palindrome + +Given a string `n` representing an integer, return the closest integer (not including itself), which is a palindrome. If there is a tie, return the smaller one. + +The closest is defined as the absolute difference minimized between two integers. diff --git a/20-alien-dictionary.md b/20-alien-dictionary.md new file mode 100644 index 0000000..86236bc --- /dev/null +++ b/20-alien-dictionary.md @@ -0,0 +1,3 @@ +## Alien Dictionary + +There is a new alien language that uses the Latin alphabet. However, the order among letters is unknown. You receive a list of non-empty words from the dictionary, where words are sorted lexicographically according to the rules of this new language. Derive the order of letters in this language.