Given a fixed-length integer array arr, duplicate each occurrence of zero, shifting the remaining elements to the right.Note that elements beyond the
https://go.dev/play/p/dgUwKFJ0u5fgo.dev/play/p/CKrjJR9n233go.dev/play/p/CeElLOqrIE8
This Node interface contained only two methods.The interface served as the parent interface for two struct types.The SLLNode type acted as a normal no
Scan function didn't wait when I put Enter(\\n)So I checked and modified like below.Enter should be included with ScanfI added Go routine and changed
Constraints: 1 <= nums.length <= 104 \-104 <= numsi <= 104 nums is sorted in non-decreasing order.go.dev/play/p/xhKIDRLSZNg1) First I made
Constraints:1 <= nums.length <= 5001 <= numsi <= 10^5go.dev/play/p/2KlCdhBdEB4Due to nums length, I put power 499. \- length 10^1 = 2 \-
The reason for error handling is to prevent program errors that the compiler does not notice. Then you need to set two things. 1) How to set the erro
Select statement allows our code to wait on multiple channels at the same timeSelect blocks until one channel is readyIf multiple channels are ready,
Declare an integer slice of Capacity 6 and length 0Arrays in Go are static. This means you can store the same data consecutively within a fixed array
A way for goroutines to communicateA channel passes a value from one goroutine to another"Share memory by communicatingCreate a channel => ch := make(
\-Do not communicate by sharing memory; instead, share memory by communicating\-Do not communicate by locking variables between threads\-Communicate b
I don't think AddDVD function is needed in Go. because I can decalre values in structure without it.go.dev/play/p/K9DPj7RxrXV
Go does not have classes.A method is a function with special receiver argument.func (recv ) fn()The type to which the method belongs is known as the r
Slice https://go.dev/blog/slices-intro -slice consists of three things: a pointer to an array, length and capacity. -nil and empty slices (with 0 cap
fallthrough > func main() { var word = "F" > switch word { case "A", "B", "C", "D": fmt.Println("A or B or C or D") case "E", "F", "G": fmt.Pr
Rest API API(Application Programming Interface) Interface : Method which is used for communication. for example : TV Remote control signal -> TV