Tag: GoLang
Given an integer n, return a string array answer (1-indexed) where: answer == “FizzBuzz” if i is divisible by 3 and 5. answer == “Fizz” if i is divisible …
We can sort a list of given strings from stdin and output to stdout using the following GoLang: package main import ( "fmt" "bufio" "os" "sort" "strings" ) func …
The linux uniq filters adjacent duplicate lines and then output to standout. Most of the times, we want only the unique lines, and thus we have to combine the …
Given the roots of two binary trees p and q, write a function to check if they are the same or not. Two binary trees are considered the same …
Given an integer numRows, return the first numRows of Pascal’s triangle. In Pascal’s triangle, each number is the sum of the two numbers directly above it as shown: Example …