Pow(x n) LeetCode Solution
Implement pow(x, n), which calculates x raised to the power n.
Implement pow(x, n), which calculates x raised to the power n.
Given an array of strings strs, group the anagrams together. You can return the answer in any order.
Given an input string (s) and a pattern (p), implement wildcard pattern matching with support for ‘?’ and ‘*’ where: ‘?’ Matches any single character.’*’ Matches any sequence of characters (including the empty sequence).The matching should cover the entire input string.
Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string.
Given the array nums after the possible rotation and an integer target, return the index of target if it is in nums, or -1 if it is not in nums.
Given the head of a linked list, reverse the nodes of the list k at a time, and return the modified list.
Given the head of a singly linked list, reverse the list, and return the reversed list.
Given an input string s and a pattern p, implement regular expression matching with support for ‘.’ and ‘*’ where ‘.’ Matches any single character and ‘*’ Matches zero or more of the preceding element.
Given a string s containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[‘ and ‘]’, determine if the input string is valid.
You are given an array of k linked-lists lists, each linked-list is sorted in ascending order. Merge all the linked-lists into one sorted linked-list and return it.
Given an array of strings words and a width maxWidth, format the text such that each line has exactly maxWidth characters and is fully justified.
Given an m x n binary matrix filled with 0’s and 1’s, find the largest square containing only 1’s and return its area.
Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0.
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice.
Given an integer array nums sorted in non-decreasing order, remove the duplicates in-place such that each unique element appears only once. The relative order of the elements should be kept the same.