文章 2022-02-16 来自:开发者社区

[LeetCode] Valid Word Abbreviation 验证单词缩写

Given a non-empty string s and an abbreviation abbr, return whether the string matches with the given abbreviation. A string such as "word" contains only the followi...

文章 2022-02-16 来自:开发者社区

[LeetCode] Valid Parenthesis String 验证括号字符串

Given a string containing only three types of characters: '(', ')' and '*', write a function to check whether this string is valid. We define the validity of a string by these rules: Any left parent.....

文章 2022-02-16 来自:开发者社区

[LeetCode] Valid Palindrome II 验证回文字符串之二

Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. Example 1: Input: "aba" Output: True Example 2: Input: "abca" Output: True ...

文章 2017-12-15 来自:开发者社区

[LeetCode] Graph Valid Tree 图验证树

Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), write a function to check whether these edges make up a valid tree. F...

文章 2017-12-14 来自:开发者社区

[LeetCode] Valid Phone Numbers 验证电话号码

Given a text file file.txt that contains list of phone numbers (one per line), write a one liner bash script to print all valid phone numbers. You may assume that a valid phone number must a...

文章 2017-12-12 来自:开发者社区

[LeetCode] Valid Word Square 验证单词平方

Given a sequence of words, check whether it forms a valid word square. A sequence of words forms a valid word square if the kth row and column read the exact same string, where 0 ≤k <...

文章 2017-12-11 来自:开发者社区

[LeetCode] Valid Number 验证数字

Validate if a given string is numeric. Some examples: "0"&nbsp;=&gt;&nbsp;true " 0.1 "&nbsp;=&gt;&nbsp;true "abc"&nbsp;=&gt;&nbsp;false "1 a"&nbsp;=&gt;&nbsp;false "2e10"&nbsp;=&gt;&nbsp;true Note:&nb...

文章 2017-12-02 来自:开发者社区

[LeetCode] Valid Sudoku 验证数独

Determine if a Sudoku is valid, according to:&nbsp;Sudoku Puzzles - The Rules. The Sudoku board could be partially filled, where empty cells are filled with the character&nbsp;'.'. A partially filled ...

文章 2017-12-02 来自:开发者社区

[LeetCode] Valid Parentheses 验证括号

Given a string containing just the characters&nbsp;'(',&nbsp;')',&nbsp;'{',&nbsp;'}',&nbsp;'['&nbsp;and&nbsp;']', determine if the input string is valid. The brackets must close in the correct order,&...

文章 2017-12-01 来自:开发者社区

[LeetCode] Valid Anagram 验证变位词

Given two strings&nbsp;s&nbsp;and&nbsp;t, write a function to determine if&nbsp;t&nbsp;is an anagram of&nbsp;s. For example,s&nbsp;= "anagram",&nbsp;t&nbsp;= "nagaram", return true.s&nbsp;= "rat",&nbs...

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。

算法编程

开发者社区在线编程频道官方技术圈。包含算法资源更新,周赛动态,每日一题互动。

+关注