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

LeetCode - Reverse Words in a String - Day12 (1/12/2020)

Reverse Words in a String Question Given an input string, reverse the string word by word. Example 1: Input: "the sky is blue" Output: "blue is sky the" Example 2: Input: " hello world! " Output: "world! hello" Explanation: Your reversed s…

LeetCode - Trapping Rain Water - Day12 (1/12/2020)

Trapping Rain Water Question Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. The above elevation map is represented by array [0,1,0,2,1,…

LeetCode - Valid Tic-Tac-Toe State - Day 12 (1/12/2020)

Valid Tic-Tac-Toe State Question A Tic-Tac-Toe board is given as a string array board. Return True if and only if it is possible to reach this board position during the course of a valid tic-tac-toe game. The board is a 3 x 3 array, and co…