Rotate Image LeetCode Solution
You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise).
You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise).
Given a collection of numbers, nums, that might contain duplicates, return all possible unique permutations in any order.
Given a linked list, swap every two adjacent nodes and return its head. You must solve the problem without modifying the values in the list’s nodes.
Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order.
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.
You are given the heads of two sorted linked lists list1 and list2. Merge the two lists in a one sorted list. The list should be made by splicing together the nodes of the first two lists. Return the head of the merged linked list.
Given the head of a singly linked list, reverse the list, and return the reversed list.
There is a singly-linked list head and we want to delete a node node in it. Delete the given node
Given an integer num, repeatedly add all its digits until the result has only one digit, and return it.
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 the heads of two singly linked-lists headA and headB, return the node at which the two lists intersect. If the two linked lists have no intersection at all, return null.
Given an m x n board of characters and a list of strings words, return all words on the board.
Given a string s, return the longest palindromic substring in s. A palindrome is a string which reads the same in both directions. For example, S = “aba” is a palindrome, S = “abc” is not.