Solve LeetCode problems with integrated code editor and visualize algorithms step-by-step
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list.
Given a string s, find the length of the longest substring without repeating characters.
Given an array of integers nums which is sorted in ascending order, and an integer target, write a function to search target in nums. If target exists, then return its index. Otherwise, return -1.
You are given the heads of two sorted linked lists list1 and list2.
Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.