NANorman Aranezinnormanaranez.hashnode.dev·Dec 26, 2022 · 2 min readN-Queens — LeetCode #51The n-queens puzzle is the problem of placing n queens on an n x n chessboard such that no two queens attack each other. Given an integer n, return all distinct solutions to the n-queens puzzle. You may return the answer in any order. Each solution c...00
NANorman Aranezinnormanaranez.hashnode.dev·Dec 26, 2022 · 3 min readPow(x, n) — LeetCode #50Implement pow(x, n), which calculates x raised to the power n (i.e., xn). Example 1: Input: x = 2.00000, n = 10 Output: 1024.00000 Example 2: Input: x = 2.10000, n = 3 Output: 9.26100 Example 3: Input: x = 2.00000, n = -2 Output: 0.25000 Explanatio...00
NANorman Aranezinnormanaranez.hashnode.dev·Dec 26, 2022 · 4 min readGroup Anagrams — LeetCode #49Given an array of strings strs, group the anagrams together. You can return the answer in any order. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once...00
NANorman Aranezinnormanaranez.hashnode.dev·Dec 26, 2022 · 3 min readRotate Image — LeetCode #48You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise). You have to rotate the image in-place, which means you have to modify the input 2D matrix directly. DO NOT allocate another 2D matrix and do the rotat...00
NANorman Aranezinnormanaranez.hashnode.dev·Dec 26, 2022 · 7 min readPermutations II — LeetCode #47Given 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]] Example 2: Input: nums = [1,2,3] Output: [[1,2,3],[1,3...00