Leetcode Solutions [Solved] Integer to Roman – Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. For example, 2 is written as II in Roman numeral, just two one’s added together. 12 is written as XII, which is simply X + II. The number 27 is written as XXVII, which is XX + V + II. [Solved] Implement the myAtoi(string s) function, which converts a string to a 32-bit signed integer (similar to C/C++’s atoi function). [Solved] You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, height[I]). Find two lines that together with the x-axis form a container, such that the container contains the most water. Return the maximum amount of water a container can store. [Solved] Given an integer x, return true if x is palindrome integer. An integer is a palindrome when it reads the same backward as forward. [Solved] Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-231, 231 – 1], then return 0. Assume the environment does not allow you to store 64-bit integers (signed or unsigned). [Solved] The string “PAYPALISHIRING” is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility) [Solved] Given a string s, return the longest palindromic substring in s. [Solved] Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). [Solved] Given a string s, find the length of the longest substring without repeating characters. [Solved] 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. You may assume the two numbers do not contain any leading zero, except the number 0 itself. [Solved] Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer in any order. «Previous Page 1 … 12 13 14