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 54: Spiral Matrix

Given an m x n matrix, return all the elements of the matrix in spiral order.

Leetcode 59: Spiral Matrix II

Create an n x n matrix where numbers from 1 to n^2 are arranged in a spiral order starting from the top-left corner.

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.

Leetcode 258: Add Digits

Given a non-negative integer num, repeatedly add all of its digits until the result has only one digit, and return it.

Leetcode 415: Add Strings

Given two non-negative integers represented as strings, return the sum of these numbers as a string. The solution should avoid converting the strings to integers directly or using any built-in libraries for large integers.