From af6c429b106da5850e84336bdf86f31b1513ec85 Mon Sep 17 00:00:00 2001 From: Herman Leung Date: Mon, 6 Jul 2020 11:38:35 +0800 Subject: [PATCH] Add number reference to dailycodingproblem exercises --- 20200603_product_list.py | 2 +- 20200609_nonadjacent_largest_sum.py | 2 +- 20200617_subdirectories.py | 2 +- 20200618_deserialization.py | 2 +- 20200701_edit_distance.py | 2 +- 20200702_water_trapment.py | 2 +- 20200705_rgb_sort.py | 2 +- 20200706_balanced_brackets.py | 2 +- WORK_IN_PROGRESS_mini_regex.py | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/20200603_product_list.py b/20200603_product_list.py index 6ce456f..67170a0 100644 --- a/20200603_product_list.py +++ b/20200603_product_list.py @@ -1,6 +1,6 @@ ''' 2020-06-03 -[from www.dailycodingproblem.com] +[from www.dailycodingproblem.com #2] Given an array of integers, return a new array such that each element at index i of the new array is the product of all the numbers in the original array diff --git a/20200609_nonadjacent_largest_sum.py b/20200609_nonadjacent_largest_sum.py index 7186654..d3b196c 100644 --- a/20200609_nonadjacent_largest_sum.py +++ b/20200609_nonadjacent_largest_sum.py @@ -1,7 +1,7 @@ ''' 2020-06-09 -[from dailycodingproblems.com] +[from dailycodingproblems.com #9] Given a list of integers, write a function that returns the largest sum of non-adjacent numbers. Numbers can be 0 or negative. diff --git a/20200617_subdirectories.py b/20200617_subdirectories.py index ae5c4a6..ecb05fb 100644 --- a/20200617_subdirectories.py +++ b/20200617_subdirectories.py @@ -1,6 +1,6 @@ ''' 2020-06-17 -[from www.dailycodingproblem.com] +[from www.dailycodingproblem.com #17] Suppose we represent our file system by a string in the following manner: The string "dir\n\tsubdir1\n\tsubdir2\n\t\tfile.ext" represents: diff --git a/20200618_deserialization.py b/20200618_deserialization.py index a1592bd..2a0a44d 100644 --- a/20200618_deserialization.py +++ b/20200618_deserialization.py @@ -1,6 +1,6 @@ ''' 2020-06-18 -[from www.dailycodingproblem.com] +[from www.dailycodingproblem.com #3] Given the root to a binary tree, implement serialize(root), which serializes the tree into a string, and deserialize(s), which deserializes the string back diff --git a/20200701_edit_distance.py b/20200701_edit_distance.py index e8f4ded..11b8ed7 100644 --- a/20200701_edit_distance.py +++ b/20200701_edit_distance.py @@ -1,6 +1,6 @@ ''' 2020-07-01 -[from dailycodingproblem.com] +[from dailycodingproblem.com #31] The edit distance between two strings refers to the minimum number of character insertions, deletions, and substitutions required to change one diff --git a/20200702_water_trapment.py b/20200702_water_trapment.py index bdaff81..f90fe29 100644 --- a/20200702_water_trapment.py +++ b/20200702_water_trapment.py @@ -1,6 +1,6 @@ ''' 2020-07-02 -[from dailycodingproblem.com] +[from dailycodingproblem.com #30] You are given an array of non-negative integers that represents a two-dimensional elevation map where each element is unit-width wall and the diff --git a/20200705_rgb_sort.py b/20200705_rgb_sort.py index 1db6c8a..d7dd53a 100644 --- a/20200705_rgb_sort.py +++ b/20200705_rgb_sort.py @@ -1,6 +1,6 @@ ''' 2020-07-05 -[from dailycodingproblem.com] +[from dailycodingproblem.com #35] Given an array of strictly the characters 'R', 'G', and 'B', segregate the values of the array so that all the Rs come first, the Gs come second, and the diff --git a/20200706_balanced_brackets.py b/20200706_balanced_brackets.py index cdfbf46..2925849 100644 --- a/20200706_balanced_brackets.py +++ b/20200706_balanced_brackets.py @@ -1,6 +1,6 @@ ''' 2020-07-06 -[from dailycodingproblem.com] +[from dailycodingproblem.com #27] Given a string of round, curly, and square open and closing brackets, return whether the brackets are balanced (well-formed). diff --git a/WORK_IN_PROGRESS_mini_regex.py b/WORK_IN_PROGRESS_mini_regex.py index 8ded02b..28364dd 100644 --- a/WORK_IN_PROGRESS_mini_regex.py +++ b/WORK_IN_PROGRESS_mini_regex.py @@ -1,6 +1,6 @@ ''' [WORK IN PROGRESS - NOT COMPLETED YET] -[from www.dailycodingproblem.com] +[from www.dailycodingproblem.com #25] Implement regular expression matching with the following special characters: