随笔分类 - Leetcode
摘要:Problem Given an array of n integers where n 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums e
阅读全文
摘要:Problem According to the Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematici
阅读全文
摘要:Problem Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array
阅读全文
摘要:Problem Given a char array representing tasks CPU need to do. It contains capital letters A to Z where different letters represent different tasks.Tas
阅读全文
摘要:Problem Given n non negative integers a1 , a2 , ..., an , where each represents a point at coordinate ( i , ai ). n vertical lines are drawn such that
阅读全文
摘要:Problem Given a Binary Search Tree and a target number, return true if there exist two elements in the BST such that their sum is equal to the given t
阅读全文
摘要:Problem Given a string s , find the longest palindromic substring in s . You may assume that the maximum length of s is 1000. Example Input: "babad" O
阅读全文
摘要:Problem Given a string, find the length of the longest substring without repeating characters. Example Given "abcabcbb", the answer is "abc", which th
阅读全文
摘要:Problem The string 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 bette
阅读全文
浙公网安备 33010602011771号