Permutations - LeetCode Given an array nums of distinct integers, return all the possible permutations You can return the answer in any order Example 1: Input: nums = [1,2,3] Output: [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]] Example 2: Input: nums = [0,1] Output: [[0,1],[1,0]] Example 3: Input: nums = [1] Output: [[1]] Constraints: 1 <= nums length <= 6
Permutations II - LeetCode Given a collection of numbers, nums, that might contain duplicates, return all possible unique permutations in any order Example 1: Input: nums = [1,1,2] Output: [[1,1,2], [1,2,1], [2,1,1]]
Next Permutation - LeetCode Next Permutation - A permutation of an array of integers is an arrangement of its members into a sequence or linear order * For example, for arr = [1,2,3], the following are all the permutations of arr: [1,2,3], [1,3,2], [2, 1, 3], [2, 3, 1], [3,1,2], [3,2,1]
Permutations - LeetCode Can you solve this real interview question? Permutations - Given an array nums of distinct integers, return all the possible permutations You can return the answer in any order
Count Number of Balanced Permutations - LeetCode Return the number of distinct permutations of num that are balanced Since the answer may be very large, return it modulo 109 + 7 A permutation is a rearrangement of all the characters of a string
Permutations IV - LeetCode Permutations IV - Given two integers, n and k, an alternating permutation is a permutation of the first n positive integers such that no two adjacent elements are both odd or both even Return the k-th alternating permutation sorted in lexicographical order
Permutations III - LeetCode Can you solve this real interview question? Permutations III - Level up your coding skills and quickly land a job This is the best place to expand your knowledge and get prepared for your next interview
Special Permutations - LeetCode Special Permutations - You are given a 0-indexed integer array nums containing n distinct positive integers A permutation of nums is called special if: * For all indexes 0 <= i < n - 1, either nums[i] % nums[i+1] == 0 or nums[i+1] % nums[i] == 0 Return the total number of special permutations
Permutations - LeetCode Given an array nums of distinct integers, return all the possible permutations You can return the answer in any order Example 1: Input: nums = [1,2,3] Output: [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]] Example 2: Input: nums = [0,1] Output: [[0,1],[1,0]] Example 3: Input: nums = [1] Output: [[1]] Constraints: 1 <= nums length <= 6
Permutation in String - LeetCode Permutation in String - Given two strings s1 and s2, return true if s2 contains a permutation of s1, or false otherwise In other words, return true if one of s1's permutations is the substring of s2