GeetCode Hub

Medium

Rotate List

61. Rotate List

Given the head of a linked&nbsp;list, rotate the list to the right by k places. &nbsp; Example 1: <img alt="" src="https://raw.githubusercontent.com/sumitc91/GeetCodeImage/master/Images/61-rotate1.jpg" style="width: 600px; height: 254p

read more...

Medium

Unique Paths

62. Unique Paths

A robot is located at the top-left corner of a m x n grid (marked &#39;Start&#39; in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to reach the bottom-right corner of the grid (marked &#39;Finish&#39; in the diagram

read more...

Medium

Unique Paths II

63. Unique Paths II

A robot is located at the top-left corner of a m x n grid (marked &#39;Start&#39; in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to reach the bottom-right corner of the grid (marked &#39;Finish&#39; in the diagram

read more...

Medium

Minimum Path Sum

64. Minimum Path Sum

Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right, which minimizes the sum of all numbers along its path. Note: You can only move either down or right at any point in time. &nbsp; <stron

read more...

Hard

Valid Number

65. Valid Number

A valid number can be split up into these components (in order): A decimal number or an integer. (Optional) An &#39;e&#39; or &#39;E&#39;, followed by an integer.

read more...

Easy

Plus One

66. Plus One

Given a non-empty array of decimal digits&nbsp;representing a non-negative integer, increment&nbsp;one to the integer. The digits are stored such that the most significant digit is at the head of the list, and each element in the array contains a single digit. You

read more...

Easy

Add Binary

67. Add Binary

Given two binary strings a and b, return their sum as a binary string. &nbsp; Example 1: Input: a = "11", b = "1" Output: "100" Example 2: Input

read more...

Hard

Text Justification

68. Text Justification

Given an array of words and a width&nbsp;maxWidth, format the text such that each line has exactly maxWidth characters and is fully (left and right) justified. You should pack your words in a greedy approach; that is, pack as many words as you can in each line. Pad extra

read more...

Easy

Sqrt(x)

69. Sqrt(x)

Given a non-negative integer x,&nbsp;compute and return the square root of x. Since the return type&nbsp;is an integer, the decimal digits are truncated, and only the integer part of the result&nbsp;is returned.

read more...

Easy

Climbing Stairs

70. Climbing Stairs

You are climbing a staircase. It takes n steps to reach the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? &nbsp; Example 1: Input: n =

read more...

Medium

Simplify Path

71. Simplify Path

Given a string path, which is an absolute path (starting with a slash &#39;/&#39;) to a file or directory in a Unix-style file system, convert it to the simplified canonical path. In a Unix-style file system, a period &#39;

read more...

Hard

Edit Distance

72. Edit Distance

Given two strings word1 and word2, return the minimum number of operations required to convert word1 to word2. You have the following three operations permitted on a word: Insert a character Delete a cha

read more...