diff --git a/README.md b/README.md index 7d45f41..e005166 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Welcome to **Data Structures and Algorithms in Go**! 🎉 This project is design * [Longest Valid Parentheses](./stack/longest_valid_parentheses_test.go) * [Queues](./queue/README.md) * [A Queue Using Stacks](./queue/queue_using_stacks_test.go) - * [Implement a Circular Queue Array](./circular_queue_using_array_test.go) + * [Implement a Circular Queue Array](./queue/circular_queue_using_array_test.go) * [Is Binary Tree Symmetrical](./queue/is_tree_symmetrical_test.go) * [Generate Binary Numbers](./queue/generate_binary_numbers_test.go) * [Find The Maximum Sub-array of Length K](./queue/maximum_of_sub_arrays_test.go) @@ -122,7 +122,7 @@ Welcome to **Data Structures and Algorithms in Go**! 🎉 This project is design * [Word Ladder](./graph/word_ladder_test.go) * [Network Delay Time](./graph/network_delay_time_test.go) * [Number of Islands](./graph/number_of_islands_test.go) - * [Dependency Order](./graph/dependency_order_test) + * [Dependency Order](./graph/dependency_order_test.go) * [Greedy Algorithms](./greedy/README.md) * [Maximum Stock Profit](./greedy/max_stock_profit_test.go) * [Activity Selector](./greedy/activity_selector_test.go) diff --git a/array/README.md b/array/README.md index 5ac220a..0b7c736 100644 --- a/array/README.md +++ b/array/README.md @@ -14,11 +14,8 @@ package main import "fmt" func main() { - // Declare an array with 2 int elements, defaulting to 0. var nums1 [2]int - // Initialize an array with 3 int elements. nums2 := [3]int{1, 2, 3} - // Print both arrays. fmt.Println(nums1, nums2) // Prints [0 0] [1 2 3] } ``` @@ -66,13 +63,11 @@ import "fmt" func main() { // Initialize a slice with 6 elements. nums := []int{1, 2, 3, 4, 5, 6} - // Sequentially modify the slice. nums = nums[:len(nums)-1] // Drop the last element nums = nums[1:] // Drop the first element nums = nums[1:] // Keep all elements from index 1 to the end nums = nums[:2] // Keep all elements up to (but not including) index 2 nums = nums[1:2] // Keep only the element at index 1 - // Print final slice. fmt.Println(nums) // Prints [4] } ```