Question Implement wildcard pattern matching with support for ‘?’ and ‘*’. ‘?’ Matches any single character. ‘*’ Matches any sequence of characters (including the empty sequence). The matching should cover the entire input string (not partial). The function prototype should be: bool isMatch(const char *s, const char *p) This question is provided by LeetCode.
QUESTION Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where “adjacent” cells are those horizontally or vertically neighboring. The same letter cell may not be used more than once. This question is provided by Leetocode.
QUESTION Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. This question is provided by Leetocode.
QUESTION Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively. Below is one possible representation of s1 = “great”:
g r e at
To scramble the string, we may choose any non-leaf node and swap its two children. For example, if we choose the node “gr” and Read the full article…
QUESTION Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). This question is provided by LeetCode.
QUESTION Given a string containing just the characters ‘(‘ and ‘)’, find the length of the longest valid (well-formed) parentheses substring. For “(()”, the longest valid parentheses substring is “()”, which has length = 2. Another example is “)()())”, where the longest valid parentheses substring is “()()”, which has length = 4. This question is Read the full article…
QUESTION Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for “abcabcbb” is “abc”, which the length is 3. For “bbbbb” the longest substring is “b”, with the length of 1. This question is provided by LeetCode.
QUESTION Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring. This question is provided by LeetCode.
QUESTION Write a function to find the longest common prefix string amongst an array of strings. This question is provided by LeetCode.
QUESTION Given a string s consists of upper/lower-case alphabets and empty space characters ‘ ‘, return the length of last word in the string. If the last word does not exist, return 0. Note: A word is defined as a character sequence consists of non-space characters only. This question is provided by LeetCode.