摘要:
问题描述Validate if a given string is numeric.Some examples:"0"=>true" 0.1 "=>true"abc"=>false"1 a"=>false"2e10"=>trueNote:It is intended for the problem ... 阅读全文
摘要:
问题描述Given two words (beginWordandendWord), and a dictionary, find the length of shortest transformation sequence frombeginWordtoendWord, such that:Onl... 阅读全文
摘要:
Problem I:判断数字是不是回文字符串形式Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative int... 阅读全文
摘要:
问题描述Clone an undirected graph. Each node in the graph contains alabeland a list of itsneighbors.OJ's undirected graph serialization:Nodes are labeled ... 阅读全文
摘要:
问题描述Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains on... 阅读全文
摘要:
Problem I: Lowest Common Ancestor of a Binary Search TreeGiven a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in... 阅读全文
摘要:
问题描述Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.解决思路1.定义Line类{slope; intercept; isVertical; isHor... 阅读全文
摘要:
问题描述You are given a string,s, and a list of words,words, that are all of the same length. Find all starting indices of substring(s) insthat is a conca... 阅读全文