All Posts

Leetcode 2: Add Two Numbers

You are given two linked lists representing two non-negative integers, where each node contains a single digit, and the digits are stored in reverse order. Your task is to add these two numbers and return the result as a linked list. You can assume that the input does not contain leading zeros except for the number 0 itself.

Leetcode 3: Longest Substring Without Repeating Characters

Given a string, determine the length of the longest substring that contains no repeating characters. The substring must consist of consecutive characters, and its length is to be returned as the output.

Leetcode 5: Longest Palindromic Substring

Given a string, find and return the longest palindromic substring in it. A palindrome is a word that reads the same forward and backward. The substring must be contiguous within the original string.

Leetcode 6: Zigzag Conversion

Given a string, write it in a zigzag pattern on a specified number of rows and then read the rows line by line to create the final string. Return this transformed string.

Leetcode 7: Reverse Integer

Reverse the digits of a signed 32-bit integer. If the reversed integer is outside the range of a signed 32-bit integer, return 0. You are restricted from using 64-bit integers.

Leetcode 8: String to Integer (atoi)

Convert a string to a 32-bit signed integer, handling whitespaces, optional signs, and non-digit characters.