2020-01-03から1日間の記事一覧

LeetCode - Bulls and Cows - Day3 (1/3/2020)

Bulls and Cows Question You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is. Each time your friend makes a guess, you provide a hint that indicates how…

LeetCode - Lisence Key Formatting - Day3 (1/3/2020)

Lisence Key Formatting Question You are given a license key represented as a string S which consists only alphanumeric character and dashes. The string is separated into N+1 groups by N dashes. Given a number K, we would want to reformat t…

LeetCode - Backspace String Compare - Day3 (1/3/2020)

Backspace String Compare Given two strings S and T, return if they are equal when both are typed into empty text editors. # means a backspace character. Example 1: Input: S = "ab#c", T = "ad#c" Output: true Explanation: Both S and T become…

LeetCode - Compare Strings by Frequency of the Smallest Character - Day3 (1/3/2020)

Compare Strings by Frequency of the Smallest Character Question Let's define a function f(s) over a non-empty string s, which calculates the frequency of the smallest character in s. For example, if s = "dcce" then f(s) = 2 because the sma…

LeetCode - Logger Rate Limiter - Day3 (1/3/2020)

Logger Rate Limiter Question Design a logger system that receive stream of messages along with its timestamps, each message should be printed if and only if it is not printed in the last 10 seconds. Given a message and a timestamp (in seco…

LeetCode - Preface - Day3 (1/3/2020)

寝正月? I spend most of the day to do Contrail CTF, so I picked 5 easy questions from Google.