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

LeetCode - String Compression - Day15 (1/15/2020)

String Compression Question Given an array of characters, compress it in-place. The length after compression must always be smaller than or equal to the original array. Every element of the array should be a character (not int) of length 1…

LeetCode - Longest Palindromic Substring- Day15 (1/15/2020)

Longest Palindromic Substring Question Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example 1: Input: "babad" Output: "bab" Note: "aba" is also a valid answer. Example …

LeetCode - Design Tic-Tac-Toe - Day15 (1/15/2020)

Design Tic-Tac-Toe Question Design a Tic-tac-toe game that is played between two players on a n x n grid. You may assume the following rules: A move is guaranteed to be valid and is placed on an empty block. Once a winning condition is rea…