[AtCoder] D - Candidates of No Shortest PathsRead more
[AtCoder] C - Back and ForthRead more
[AtCoder] B - Sum of Three IntegersRead more
[Codeforces] Round #655 (Div. 2) C. Omkar and BaseballRead more
[Codeforces] Round #657 (Div. 2) A. Acacius and StringRead more
[Codeforces] Round #657 (Div. 2) B. Dubious CyrptoRead more
[Codeforces] Round #656 (Div. 3) D. a-Good StringRead more
[Codeforces] Educational Round 92 (Rated for Div. 2) C. Good StringRead more
[LeetCode] Minimum Number of Frogs Croaking

1419. Minimum Number of Frogs Croaking

You are given the string croakOfFrogs, which represents a combination of the string “croak” from different frogs, that is, multiple frogs can croak at the same time, so multiple “croak” are mixed.

Return the minimum number of different frogs to finish all the croaks in the given string.

A valid “croak” means a frog is printing five letters ‘c’, ‘r’, ‘o’, ‘a’, and ‘k’ sequentially. The frogs have to print all five letters to finish a croak. If the given string is not a combination of a valid “croak” return -1.

Read more
[LeetCode] Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree

1430. Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree

Given a binary tree where each path going from the root to any leaf form a valid sequence, check if a given string is a valid sequence in such binary tree.

We get the given string from the concatenation of an array of integers arr and the concatenation of all values of the nodes along a path results in a sequence in the given binary tree.

Read more