Category: c / c++
On a staircase, the i-th step has some non-negative cost cost assigned (0 indexed). Once you pay the cost, you can either climb one or two steps. You need …
The Trie is common used data structure to speed up the word searching. The Trie is a structure to index the words character by character. Trie Definition in C++ …
Given a set of keywords words and a string S, make all appearances of all keywords in S bold. Any letters between and tags become bold. The returned string …
Given an unsorted array return whether an increasing subsequence of length 3 exists or not in the array. Formally the function should: Return true if there exists i, j, …
For strings S and T, we say “T divides S” if and only if S = T + … + T (T concatenated with itself 1 or more times) …