├── Algorith_A_Day.Tests
└── Algorith_A_Day.Tests
│ ├── Algorith_A_Day - Backup.Tests.csproj
│ ├── Algorith_A_Day.Tests.csproj
│ ├── BinaryTree
│ └── Same_Tree_LC_100_E_Tests.cs
│ ├── DP
│ └── Climbing_Stairs_LC_70_E_DPTests.cs
│ ├── DesignOnes
│ └── Design_Parking_System_LC_1603_ETests.cs
│ ├── FromCompanies
│ └── LyftronTests.cs
│ ├── Multidimensional_Arrays
│ └── Kth_Smallest_Element_in__Sorted_Matrix_LC_378_MTests.cs
│ ├── Patterns
│ └── MergeIntervals
│ │ └── InsertInterval
│ │ └── Insert_Interval_LC_57_M_Tests.cs
│ ├── RandomEasy
│ ├── Add_Binary_67_LC_ETests.cs
│ ├── Goal_Parser_Interpretation_LC_1678_E_Tests.cs
│ ├── How___Number_LC_1365_E_Tests.cs
│ ├── Majority_Element_LC_169_E_Tests.cs
│ ├── Merge_Alternately_LC_1768_E_Tests.cs
│ ├── Number_of_Steps_to_Zero_LC_1342_E_Tests.cs
│ ├── Richest_Customer_Wealth_LC_1672_E_Tests.cs
│ ├── Shuffle_String_LC_1528_E_Tests.cs
│ └── Sum__Array_1685_LC_M_Tests.cs
│ ├── bin
│ └── Debug
│ │ └── net5.0
│ │ ├── Algorith_A_Day.Tests.deps.json
│ │ ├── Algorith_A_Day.Tests.dll
│ │ ├── Algorith_A_Day.Tests.pdb
│ │ ├── Algorith_A_Day.Tests.runtimeconfig.dev.json
│ │ ├── Algorith_A_Day.Tests.runtimeconfig.json
│ │ ├── Algorithm_A_Day.deps.json
│ │ ├── Algorithm_A_Day.dll
│ │ ├── Algorithm_A_Day.exe
│ │ ├── Algorithm_A_Day.pdb
│ │ ├── Algorithm_A_Day.runtimeconfig.dev.json
│ │ ├── Algorithm_A_Day.runtimeconfig.json
│ │ ├── Microsoft.TestPlatform.CommunicationUtilities.dll
│ │ ├── Microsoft.TestPlatform.CoreUtilities.dll
│ │ ├── Microsoft.TestPlatform.CrossPlatEngine.dll
│ │ ├── Microsoft.TestPlatform.PlatformAbstractions.dll
│ │ ├── Microsoft.TestPlatform.Utilities.dll
│ │ ├── Microsoft.VisualStudio.CodeCoverage.Shim.dll
│ │ ├── Microsoft.VisualStudio.TestPlatform.Common.dll
│ │ ├── Microsoft.VisualStudio.TestPlatform.ObjectModel.dll
│ │ ├── Newtonsoft.Json.dll
│ │ ├── NuGet.Frameworks.dll
│ │ ├── cs
│ │ ├── Microsoft.TestPlatform.CommunicationUtilities.resources.dll
│ │ ├── Microsoft.TestPlatform.CoreUtilities.resources.dll
│ │ ├── Microsoft.TestPlatform.CrossPlatEngine.resources.dll
│ │ ├── Microsoft.VisualStudio.TestPlatform.Common.resources.dll
│ │ └── Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll
│ │ ├── de
│ │ ├── Microsoft.TestPlatform.CommunicationUtilities.resources.dll
│ │ ├── Microsoft.TestPlatform.CoreUtilities.resources.dll
│ │ ├── Microsoft.TestPlatform.CrossPlatEngine.resources.dll
│ │ ├── Microsoft.VisualStudio.TestPlatform.Common.resources.dll
│ │ └── Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll
│ │ ├── es
│ │ ├── Microsoft.TestPlatform.CommunicationUtilities.resources.dll
│ │ ├── Microsoft.TestPlatform.CoreUtilities.resources.dll
│ │ ├── Microsoft.TestPlatform.CrossPlatEngine.resources.dll
│ │ ├── Microsoft.VisualStudio.TestPlatform.Common.resources.dll
│ │ └── Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll
│ │ ├── fr
│ │ ├── Microsoft.TestPlatform.CommunicationUtilities.resources.dll
│ │ ├── Microsoft.TestPlatform.CoreUtilities.resources.dll
│ │ ├── Microsoft.TestPlatform.CrossPlatEngine.resources.dll
│ │ ├── Microsoft.VisualStudio.TestPlatform.Common.resources.dll
│ │ └── Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll
│ │ ├── it
│ │ ├── Microsoft.TestPlatform.CommunicationUtilities.resources.dll
│ │ ├── Microsoft.TestPlatform.CoreUtilities.resources.dll
│ │ ├── Microsoft.TestPlatform.CrossPlatEngine.resources.dll
│ │ ├── Microsoft.VisualStudio.TestPlatform.Common.resources.dll
│ │ └── Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll
│ │ ├── ja
│ │ ├── Microsoft.TestPlatform.CommunicationUtilities.resources.dll
│ │ ├── Microsoft.TestPlatform.CoreUtilities.resources.dll
│ │ ├── Microsoft.TestPlatform.CrossPlatEngine.resources.dll
│ │ ├── Microsoft.VisualStudio.TestPlatform.Common.resources.dll
│ │ └── Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll
│ │ ├── ko
│ │ ├── Microsoft.TestPlatform.CommunicationUtilities.resources.dll
│ │ ├── Microsoft.TestPlatform.CoreUtilities.resources.dll
│ │ ├── Microsoft.TestPlatform.CrossPlatEngine.resources.dll
│ │ ├── Microsoft.VisualStudio.TestPlatform.Common.resources.dll
│ │ └── Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll
│ │ ├── pl
│ │ ├── Microsoft.TestPlatform.CommunicationUtilities.resources.dll
│ │ ├── Microsoft.TestPlatform.CoreUtilities.resources.dll
│ │ ├── Microsoft.TestPlatform.CrossPlatEngine.resources.dll
│ │ ├── Microsoft.VisualStudio.TestPlatform.Common.resources.dll
│ │ └── Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll
│ │ ├── pt-BR
│ │ ├── Microsoft.TestPlatform.CommunicationUtilities.resources.dll
│ │ ├── Microsoft.TestPlatform.CoreUtilities.resources.dll
│ │ ├── Microsoft.TestPlatform.CrossPlatEngine.resources.dll
│ │ ├── Microsoft.VisualStudio.TestPlatform.Common.resources.dll
│ │ └── Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll
│ │ ├── ref
│ │ └── Algorith_A_Day.Tests.dll
│ │ ├── ru
│ │ ├── Microsoft.TestPlatform.CommunicationUtilities.resources.dll
│ │ ├── Microsoft.TestPlatform.CoreUtilities.resources.dll
│ │ ├── Microsoft.TestPlatform.CrossPlatEngine.resources.dll
│ │ ├── Microsoft.VisualStudio.TestPlatform.Common.resources.dll
│ │ └── Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll
│ │ ├── testhost.dll
│ │ ├── testhost.exe
│ │ ├── tr
│ │ ├── Microsoft.TestPlatform.CommunicationUtilities.resources.dll
│ │ ├── Microsoft.TestPlatform.CoreUtilities.resources.dll
│ │ ├── Microsoft.TestPlatform.CrossPlatEngine.resources.dll
│ │ ├── Microsoft.VisualStudio.TestPlatform.Common.resources.dll
│ │ └── Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll
│ │ ├── xunit.abstractions.dll
│ │ ├── xunit.assert.dll
│ │ ├── xunit.core.dll
│ │ ├── xunit.execution.dotnet.dll
│ │ ├── xunit.runner.reporters.netcoreapp10.dll
│ │ ├── xunit.runner.utility.netcoreapp10.dll
│ │ ├── xunit.runner.visualstudio.dotnetcore.testadapter.dll
│ │ ├── zh-Hans
│ │ ├── Microsoft.TestPlatform.CommunicationUtilities.resources.dll
│ │ ├── Microsoft.TestPlatform.CoreUtilities.resources.dll
│ │ ├── Microsoft.TestPlatform.CrossPlatEngine.resources.dll
│ │ ├── Microsoft.VisualStudio.TestPlatform.Common.resources.dll
│ │ └── Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll
│ │ └── zh-Hant
│ │ ├── Microsoft.TestPlatform.CommunicationUtilities.resources.dll
│ │ ├── Microsoft.TestPlatform.CoreUtilities.resources.dll
│ │ ├── Microsoft.TestPlatform.CrossPlatEngine.resources.dll
│ │ ├── Microsoft.VisualStudio.TestPlatform.Common.resources.dll
│ │ └── Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll
│ └── obj
│ ├── Algorith_A_Day.Tests.csproj.nuget.dgspec.json
│ ├── Algorith_A_Day.Tests.csproj.nuget.g.props
│ ├── Algorith_A_Day.Tests.csproj.nuget.g.targets
│ ├── Debug
│ ├── net5.0
│ │ ├── .NETCoreApp,Version=v5.0.AssemblyAttributes.cs
│ │ ├── Algorith_A_Day.Tests.AssemblyInfo.cs
│ │ ├── Algorith_A_Day.Tests.AssemblyInfoInputs.cache
│ │ ├── Algorith_A_Day.Tests.GeneratedMSBuildEditorConfig.editorconfig
│ │ ├── Algorith_A_Day.Tests.assets.cache
│ │ ├── Algorith_A_Day.Tests.csproj.AssemblyReference.cache
│ │ ├── Algorith_A_Day.Tests.csproj.CopyComplete
│ │ ├── Algorith_A_Day.Tests.csproj.CoreCompileInputs.cache
│ │ ├── Algorith_A_Day.Tests.csproj.FileListAbsolute.txt
│ │ ├── Algorith_A_Day.Tests.dll
│ │ ├── Algorith_A_Day.Tests.genruntimeconfig.cache
│ │ ├── Algorith_A_Day.Tests.pdb
│ │ └── ref
│ │ │ └── Algorith_A_Day.Tests.dll
│ └── netcoreapp3.1
│ │ ├── .NETCoreApp,Version=v3.1.AssemblyAttributes.cs
│ │ ├── Algorith_A_Day.Tests.AssemblyInfo.cs
│ │ ├── Algorith_A_Day.Tests.AssemblyInfoInputs.cache
│ │ ├── Algorith_A_Day.Tests.assets.cache
│ │ └── Algorith_A_Day.Tests.csprojAssemblyReference.cache
│ ├── project.assets.json
│ └── project.nuget.cache
└── Algorith_A_Day
├── .gitattributes
├── .gitignore
├── Algorithm_A_Day.csproj
├── Algorithm_A_Day.sln
├── Algorithms
└── Kadane's
│ └── Maximum_Subarray_LC_53_E.cs
├── Arrays
├── Find_Numbers_with_Even_Number_of_Digits_1295.cs
├── Kids_With_Candies_LC_1431_E.cs
├── Merge_Sorted_Array_88.cs
├── Pairs with Specific Difference - pramp.cs
├── Pancake_Sorting_LC_969.cs
├── Running_Sum_of1d_Array_LC_1480_E.cs
├── Shuffle_the_Array_LC_1470_E.cs
└── Temperatures Codingame.cs
├── Backtracking
└── Letter_Combinations_of_P_Number_LC_17_M.cs
├── Basics
├── CollatzConjecture.cs
├── Factorial.cs
├── Fibonacci.cs
└── Palindrome.cs
├── BinarySearch
├── BinarySearch.cs
├── ExponentialSearch.cs
├── FindFirstOccurrence.cs
├── FindFloorOrCeil.cs
├── FindNumberOfOnes.cs
├── FindPeakElement.cs
├── FindTargetNumber.cs
├── NumberOfRoatations.cs
├── SearchInNearlySorted.cs
├── Search_Insert_Position_LC_35.cs
└── SmallestMissingElement.cs
├── BinaryTree
├── AdvancedBT.cs
├── BinarySearchTree.cs
├── BinaryTreeTraverasals.cs
├── LeavesOfBt.cs
├── MiddleLvlBinaryTree.cs
├── Same_Tree_LC_100_E.cs
└── TreeNode.cs
├── BitManipulation
└── Binary_Watch_401.cs
├── Clash_of_Code
└── Ip_Address.cs
├── DP
├── Climbing_Stairs_LC_70_E_DP.cs
└── Delete_Operation_for_Two_Strings_LC_583.cs
├── DesignOnes
├── Design_Ordered_Stream_LC_1656_E.cs
└── Design_Parking_System_LC_1603_E.cs
├── EASY_WORTH_RECALLING.txt
├── Extensions
└── Extension Methods.cs
├── FromCompanies
├── Codility.cs
└── Lyftron.cs
├── JS
└── helper.js
├── MathRelated
├── Count_Primes_LC_204.cs
├── Pramp
│ └── Root_Of_Number.cs
└── Sqrt(x)_LC_69.cs
├── Multidimensional Arrays
├── Ada King CodeChef.cs
├── Kth_Smallest_Element_in_ Sorted_Matrix_LC_378_M.cs
├── Matrixes.cs
├── Power of Thor - Episode 1 - Codoingame.cs
├── Rotate_Image_LC_48.cs
├── Spiral_Matrix_II_59.cs
└── Spiral_Matrix_LC_54.cs
├── NodesModels
├── ListNode.cs
├── Node.cs
└── TreeNode.cs
├── Patterns
├── 2Pointers
│ ├── 3Sum_Closest_LC_16.cs
│ ├── 3Sum_LC_15.cs
│ ├── Intersection_of_Two_Arrays_II_LC_350.cs
│ ├── Intersection_of_Two_Arrays_LC_349.cs
│ ├── RemoveElement LC - 27.cs
│ ├── Remove_Duplicates_from_Sorted Array_LC_26.cs
│ ├── Squares of a Sorted Array - LeedCode 977.cs
│ ├── Two Sum - LeetCode 1.cs
│ └── Valid Palindrome II LeetCode680.cs
├── BFS
│ ├── Average_of_Levels_in_Binary_Tree_LC_637.cs
│ ├── Level Order_Traversal.cs
│ ├── Level Order_Traversal_ 2.cs
│ ├── Minimum_Depth_Binary_Tree_LC_111.cs
│ └── Rotting Oranges.cs
├── CyclicSort
│ ├── Find_All_Duplicates_in_Array_442.cs
│ ├── Find_All_Numbers_Disappeared_In_Array_LC_448.cs
│ ├── Missing_Number_LC_268.cs
│ └── Set_Mismatch_LC_645.cs
├── DFS
│ ├── Binary_Tree_Paths.cs
│ ├── Number_Of_Islands_LC_200.cs
│ ├── Path_Sum_II_LC_113.cs
│ └── Path_Sum_LC-112.cs
├── DP-01Knapsack
│ └── Partition_Equal_Subset_Sum_LC_416.cs
├── FastAndSlowPointers
│ ├── Happy_Number.cs
│ ├── Link_List_Cycle_LC_141.cs
│ └── Middle_of_Linked_List_LC_876.cs
├── K-thLargestElement
│ ├── K_Closest_Points_to_Origin_LC_973.cs
│ └── Kth_Largest_Element.cs
├── K-way Merge
│ └── Merge_k_Sorted_Lists.cs
├── MergeIntervals
│ ├── InsertInterval
│ │ ├── Insert Interval_LC_57_M.cs
│ │ └── InsertInterval_LC_57_M.js
│ └── Merge_Intervals_LC_56.cs
├── ModifiedBinarySearch
│ ├── Binary_Search_LC_704.cs
│ └── Find_Smallest_Letter_Greater_Than_Target_LC_744.cs
├── ReverseLinkedList
│ ├── Reverse_Linked_List_II_LC_92.cs
│ └── Reverse_Linked_List_LC_206.cs
├── Sliding Window
│ ├── Fruit Into Baskets_LC_904.cs
│ ├── Longest Substring with K Distinct Characters.cs
│ ├── Longest_Repeating_Character_Replacement_LC_424.cs
│ ├── Longest_Substring_Without_Repeating_Characters_LC_3.cs
│ ├── Maximum Sum Subarray of Size K.cs
│ ├── Permutation_in_String_LC_567.cs
│ ├── Sliding Window.cs
│ └── Smallest Subarray with a given sum_LC_209.cs
└── Subsets
│ ├── Subsets_II_LC_90.cs
│ └── Subsets_LC_78.cs
├── Program.cs
├── RandomEasy
├── Add_Binary_67_LC_E.cs
├── Build_Array_from_Permutation_LC_1920_E.cs
├── Check_Equivalent_1662_LC_E.cs
├── Contains_Duplicate_LC_217_E.cs
├── Convert_Sorted_Array_to_BST_LC_108_E.cs
├── Count_Matrix_LC_1351_E.cs
├── Create_Order_1389_LC_E.cs
├── Decompress_Run_Length_Encoded_List_LC_1313_E.cs
├── Defanging_an_IP_Address_1108_E.cs
├── Fizz_Buzz_LC_412_E.cs
├── Goal_Parser_Interpretation_LC_1678_E.cs
├── How___Number_LC_1365_E.cs
├── Integer_to_Roman_LC_12.cs
├── Jewels_and_Stones_LC_771_E.cs
├── Keyboard_Row_LC_500_E.cs
├── Length_of_Last_Word_LC_58_E.cs
├── Majority_Element_LC_169_E.cs
├── Merge_Alternately_LC_1768_E.cs
├── Merge_Two_Sorted_L_Lists_LC_21.cs
├── Number__Square_1725_LC_E.cs
├── Number_of_Good_Pairs_1512_LC_E.cs
├── Number_of_Segments_in_a_String_LC_434_E.cs
├── Number_of_Steps_to_Zero_LC_1342_E.cs
├── Palindrome_Number_9.cs
├── Plus_One_66_LC_E.cs
├── Richest_Customer_Wealth_LC_1672_E.cs
├── Roman_to_Integer_LC_13.cs
├── Self_Dividing_Numbers_LC_728_E.cs
├── Shuffle_String_LC_1528_E.cs
├── Single_Number_LC_136.cs
├── Subtract_Integer_1281_LC_E.cs
├── Sum_Subarrays_LC _1588_E.cs
├── Unique_Email_Addresses_LC_929_E.cs
├── Unique_Morse_Code_Words_LC_804_E.cs
└── Valid_Parentheses_LC_20_E.cs
├── RandomMedium
├── Majority_Element_II_LC_229_M.cs
└── Sum_ Array_1685_LC_M.cs
├── Recursion
├── N-th_Tribonacci_Number_1137.cs
├── Reverse_String_LC_344_E.cs
└── Swap_Nodes_in_Pairs_LC_24_M.cs
├── RecursiveToDeal
├── IDKrecursiveMethods.cs
├── Int_To_Roman_LC_12_Recursion.cs
└── RecursionToUnderstand.cs
├── Sorting
├── BubbleSort
│ ├── BubbleSortPlain.cs
│ └── SortColors.cs
├── InsertionSort
│ └── Insertion sort.cs
├── MergeSort
│ ├── MS with 2 arrays.cs
│ └── MergeSort.cs
├── Quick Sort
│ └── QuickSort.cs
└── SelectionSort
│ └── SelectionSort.cs
└── String operations
├── Implement_strStr_LC_28.cs
├── Longest Sub-String.cs
├── Pramp
├── Longest_Common_Prefix_LC_14.cs
└── Smallest_Substring_Of_All_Chars.cs
└── RevertAString.cs
/Algorith_A_Day.Tests/Algorith_A_Day.Tests/Algorith_A_Day - Backup.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net5.0
5 |
6 | false
7 |
8 |
9 |
10 |
11 |
12 |
13 | runtime; build; native; contentfiles; analyzers; buildtransitive
14 | all
15 |
16 |
17 | runtime; build; native; contentfiles; analyzers; buildtransitive
18 | all
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Algorith_A_Day.Tests/Algorith_A_Day.Tests/Algorith_A_Day.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net5.0
5 |
6 | false
7 |
8 |
9 |
10 |
11 |
12 |
13 | runtime; build; native; contentfiles; analyzers; buildtransitive
14 | all
15 |
16 |
17 | runtime; build; native; contentfiles; analyzers; buildtransitive
18 | all
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Algorith_A_Day.Tests/Algorith_A_Day.Tests/BinaryTree/Same_Tree_LC_100_E_Tests.cs:
--------------------------------------------------------------------------------
1 | using Algorithm_A_Day.BinaryTree;
2 | using Algorithm_A_Day.NodesModels;
3 | using System;
4 | using System.Collections;
5 | using System.Collections.Generic;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using Xunit;
10 |
11 | namespace Algorith_A_Day.Tests.BinaryTree
12 | {
13 | public class Same_Tree_LC_100_E_Tests
14 | {
15 | private readonly Same_Tree_LC_100_E _sut;
16 |
17 | public Same_Tree_LC_100_E_Tests()
18 | {
19 | _sut = new Same_Tree_LC_100_E();
20 | }
21 |
22 | [Theory]
23 | [ClassData(typeof(SameTreeTestData))]
24 | public void IsSameTree_ReturnsBool_When2TreeNodesPassed(bool expected, TreeNode t1, TreeNode t2)
25 | {
26 | //Arrange
27 |
28 | //Act
29 | var actual = _sut.IsSameTree(t1, t2);
30 | //Assert
31 | Assert.Equal(expected, actual);
32 | }
33 | }
34 |
35 | public class SameTreeTestData : IEnumerable