# Microsoft

## Rotate Image LeetCode Solution

You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise).

## Permutations II LeetCode Solution

Given a collection of numbers, nums, that might contain duplicates, return all possible unique permutations in any order.

## Swap Nodes in Pairs LeetCode Solution

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.

## Permutations LeetCode Solution

Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order.

## Search in Rotated Sorted Array LeetCode Solution

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.

## Reverse Nodes in k-Group LeetCode Solution

Given the head of a linked list, reverse the nodes of the list k at a time, and return the modified list.

## Merge Two Sorted Lists LeetCode Solution

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.

## Reverse Linked List LeetCode Solution

Given the head of a singly linked list, reverse the list, and return the reversed list.

## Delete Node in a Linked List LeetCode Solution

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.

## Valid Parentheses LeetCode Solution

Given a string s containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[‘ and ‘]’, determine if the input string is valid.

## Merge k Sorted Lists LeetCode Solution

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.

## Intersection of Two Linked Lists LeetCode Solution

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.

## Word Search II LeetCode Solution

Given an m x n board of characters and a list of strings words, return all words on the board.

## Longest Palindromic Substring LeetCode Solution

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.

Scroll to Top