All Posts

Leetcode 43: Multiply Strings

Given two non-negative integers represented as strings, return their product as a string. You must not use any built-in BigInteger library or convert the inputs to integers directly.

Leetcode 48: Rotate Image

Given an n x n 2D matrix representing an image, rotate the image by 90 degrees clockwise. The rotation should be done in-place, meaning you cannot allocate another 2D matrix.

Leetcode 50: Pow(x, n)

You are given a number x and an integer n. Your task is to compute x raised to the power n (i.e., x^n). Handle cases where the exponent is negative by returning the reciprocal of the result.

Leetcode 62: Unique Paths

A robot starts at the top-left corner of an m x n grid and can only move right or down. Determine the total number of unique paths it can take to reach the bottom-right corner.

Leetcode 66: Plus One

You are given a large integer represented as an array of digits. Each digits[i] represents the ith digit of the integer, arranged from most significant to least significant. The task is to increment the integer by one and return the resulting digits as an array.

Leetcode 67: Add Binary

You are given two binary strings, a and b. Each string represents a binary number. Your task is to compute their sum and return it as a binary string.