├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── CODE_OF_CONDUCT.md ├── Concurrency in Go ├── arraySort │ └── arraySort.go ├── philosopher │ └── philosopher.go ├── raceCondition │ └── race.go └── week1 │ └── ass1.pdf ├── Functions, Methods, and Interfaces in Go ├── Animal interface │ └── animalQuery.go ├── animal │ └── animal.go ├── bubbleSort │ └── bubbleSort.go └── genDisp │ └── gendisp.go ├── Getting Started with Go ├── findian │ └── findian.go ├── hello │ └── hello.go ├── makejson │ └── makejson.go ├── read │ └── read.go ├── slice │ └── slice.go └── trunc │ └── trunc.go ├── LICENSE ├── README.md └── _config.yml /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | *.DS_Store -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at piyush.bhutoria98@gmail.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | -------------------------------------------------------------------------------- /Concurrency in Go/arraySort/arraySort.go: -------------------------------------------------------------------------------- 1 | package arraySort 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | func main() { 8 | arr := make([]int, 12) 9 | for i := 0; i < 12; i++ { 10 | fmt.Println("Enter a Int.") 11 | fmt.Scan(&arr[i]) 12 | } 13 | part1 := len(arr) / 4 14 | middle := len(arr) / 2 15 | part3 := part1 + middle 16 | c := make(chan []int, 4) 17 | go sort(arr[:part1], c) 18 | go sort(arr[part1:middle], c) 19 | go sort(arr[middle:part3], c) 20 | go sort(arr[part3:], c) 21 | arr1 := <-c 22 | arr2 := <-c 23 | arr3 := <-c 24 | arr4 := <-c 25 | final := merge(merge(arr1, arr2), merge(arr3, arr4)) 26 | fmt.Println(final) 27 | } 28 | 29 | func sort(arr []int, c chan []int) { 30 | for j := 0; j < len(arr)-1; j++ { 31 | for i := j; i < len(arr)-1; i++ { 32 | if arr[i] > arr[i+1] { 33 | arr[i], arr[i+1] = arr[i+1], arr[i] 34 | } 35 | } 36 | } 37 | c <- arr 38 | } 39 | 40 | func merge(left, right []int) []int { 41 | result := make([]int, len(left)+len(right)) 42 | 43 | i := 0 44 | for len(left) > 0 && len(right) > 0 { 45 | if left[0] < right[0] { 46 | result[i] = left[0] 47 | left = left[1:] 48 | } else { 49 | result[i] = right[0] 50 | right = right[1:] 51 | } 52 | i++ 53 | } 54 | 55 | for j := 0; j < len(left); j++ { 56 | result[i] = left[j] 57 | i++ 58 | } 59 | for j := 0; j < len(right); j++ { 60 | result[i] = right[j] 61 | i++ 62 | } 63 | 64 | return result 65 | } 66 | -------------------------------------------------------------------------------- /Concurrency in Go/philosopher/philosopher.go: -------------------------------------------------------------------------------- 1 | package philosopher 2 | 3 | import ( 4 | "fmt" 5 | "sync" 6 | "time" 7 | ) 8 | 9 | type chopS struct{ sync.Mutex } 10 | 11 | type philosopher struct { 12 | id int 13 | leftCS, rightCS *chopS 14 | } 15 | 16 | var eatWgroup sync.WaitGroup 17 | 18 | func main() { 19 | 20 | count := 5 21 | 22 | Csticks := make([]*chopS, count) 23 | for i := 0; i < count; i++ { 24 | Csticks[i] = new(chopS) 25 | } 26 | 27 | philosophers := make([]*philosopher, count) 28 | for i := 0; i < count; i++ { 29 | philosophers[i] = &philosopher{ 30 | id: i, leftCS: Csticks[i], rightCS: Csticks[(i+1)%count]} 31 | eatWgroup.Add(1) 32 | go philosophers[i].eat() 33 | 34 | } 35 | eatWgroup.Wait() 36 | } 37 | 38 | func (p philosopher) eat() { 39 | for j := 0; j < 3; j++ { 40 | p.leftCS.Lock() 41 | p.rightCS.Lock() 42 | 43 | fmt.Printf("Philosopher %d is eating\n", p.id+1) 44 | time.Sleep(time.Second) 45 | 46 | p.rightCS.Unlock() 47 | p.leftCS.Unlock() 48 | 49 | fmt.Printf("Philosopher %d is finished eating\n", p.id+1) 50 | time.Sleep(time.Second) 51 | } 52 | eatWgroup.Done() 53 | } 54 | -------------------------------------------------------------------------------- /Concurrency in Go/raceCondition/race.go: -------------------------------------------------------------------------------- 1 | package raceCondition 2 | 3 | import ( 4 | "fmt" 5 | "sync" 6 | ) 7 | 8 | var Wait sync.WaitGroup 9 | var Counter = 0 10 | 11 | func main() { 12 | for routine := 1; routine <= 2; routine++ { 13 | Wait.Add(1) 14 | go RoutineOne(routine) 15 | } 16 | 17 | Wait.Wait() 18 | fmt.Printf("Final Counter: %d\n", Counter) 19 | } 20 | 21 | func RoutineOne(id int) { 22 | for count := 0; count < 2; count++ { 23 | value := Counter 24 | //time.Sleep(1 * time.Nanosecond) // Uncomment this line for second test 25 | value++ 26 | Counter = value 27 | } 28 | Wait.Done() 29 | } 30 | 31 | /* Explanation 32 | ------------------------------------------------------------------------------------------------------ 33 | Race Condition 34 | A data race happens when two goroutines access the same variable concurrently, and at least one of the access is a write instruction. 35 | 36 | Detecting a race 37 | Use the command 38 |  go run -race routineOne.go to generate the race report 39 |  uncomment line 28 40 |  go run -race routineOne.go to generate the race report 41 | 42 | 43 | Conclusion 44 | • Result one and two generates 2 different Final Counter after adding wait period 45 | • Adding the pause caused the result to fail (should be 4) 46 | • -race parameter generates a report to find data races. 47 | • The report describes when the write value happened 48 | 49 | The example provided commenting/uncommenting line 28 shows the difference of context switching 50 | 51 | Without pause 52 | ------------- 53 | Without the pause, the final Counter value = 4 54 | This is because, before the second routine is executed (Line 13), routine 1 loop has already completed 55 | writing the value to Counter. 56 | 57 | Hence; 58 | Loop 1 -> Increment -> Context Switch -> Loop 2 59 | 60 | With pause 61 | ---------- 62 | With the pause, the context switch happens before routine 1 loop is finished. 63 | Therefore resulting to final counter value = 2 64 | 65 | Hence 66 | Loop 1 -> Context Switch -> Loop 2 67 | Resulting the second loop to start count from 0, instead of 2 68 | */ 69 | -------------------------------------------------------------------------------- /Concurrency in Go/week1/ass1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Piyushhbhutoria/Programming-with-Google-Go/26bb0649f861c85314b26b5e7748a39319bb0de2/Concurrency in Go/week1/ass1.pdf -------------------------------------------------------------------------------- /Functions, Methods, and Interfaces in Go/Animal interface/animalQuery.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | type Animal interface { 8 | Eat() 9 | Speak() 10 | Move() 11 | } 12 | 13 | type Cow struct{} 14 | 15 | func (cow Cow) Eat() { 16 | fmt.Println("food: grass") 17 | } 18 | 19 | func (cow Cow) Move() { 20 | fmt.Println("locomotion: walk") 21 | } 22 | 23 | func (cow Cow) Speak() { 24 | fmt.Println("noise: moo") 25 | } 26 | 27 | type Bird struct{} 28 | 29 | func (bird Bird) Eat() { 30 | fmt.Println("food: worms") 31 | } 32 | 33 | func (bird Bird) Move() { 34 | fmt.Println("locomotion: fly") 35 | } 36 | 37 | func (bird Bird) Speak() { 38 | fmt.Println("noise: peep") 39 | } 40 | 41 | type Snake struct{} 42 | 43 | func (snake Snake) Eat() { 44 | fmt.Println("food: mice") 45 | } 46 | 47 | func (snake Snake) Move() { 48 | fmt.Println("locomotion: slither") 49 | } 50 | 51 | func (snake Snake) Speak() { 52 | fmt.Println("noise: hsss") 53 | } 54 | 55 | func main() { 56 | var req string 57 | var s1 string 58 | var s2 string 59 | m := make(map[string]Animal) 60 | cow := Cow{} 61 | bird := Bird{} 62 | snake := Snake{} 63 | 64 | for { 65 | fmt.Print(">") 66 | fmt.Scan(&req) 67 | fmt.Scan(&s1) 68 | fmt.Scan(&s2) 69 | 70 | if (req == "newanimal") { 71 | if s2 == "cow" { 72 | m[s1] = cow 73 | } else if s2 == "bird" { 74 | m[s1] = bird 75 | } else if s2 == "snake" { 76 | m[s1] = snake 77 | } else { 78 | fmt.Println("Incorrect input. Try again") 79 | continue 80 | } 81 | fmt.Println("Created it!") 82 | } else if (req == "query") { 83 | ani, ok := m[s1] 84 | if !ok { 85 | fmt.Println("Incorrect input. Try again") 86 | } else { 87 | if s2 == "eat" { 88 | ani.Eat() 89 | } else if s2 == "move" { 90 | ani.Move() 91 | } else if s2 == "speak" { 92 | ani.Speak() 93 | } else { 94 | fmt.Println("Incorrect input. Try again") 95 | } 96 | } 97 | } else { 98 | fmt.Println("Incorrect input. Try again") 99 | } 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /Functions, Methods, and Interfaces in Go/animal/animal.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | type Animal struct { 8 | food string 9 | locomotion string 10 | noise string 11 | } 12 | 13 | func main() { 14 | var ( 15 | a string 16 | ani Animal 17 | r string 18 | ) 19 | for { 20 | fmt.Print(">") 21 | fmt.Scan(&a) 22 | fmt.Scan(&r) 23 | if a == "cow" { 24 | ani = Animal{"grass", "walk", "moo"} 25 | } else if a == "bird" { 26 | ani = Animal{"worms", "fly", "peep"} 27 | } else if a == "snake" { 28 | ani = Animal{"mice", "slither", "hsss"} 29 | } else { 30 | fmt.Println("Incorrect input. Try again") 31 | } 32 | if r == "eat" { 33 | ani.Eat() 34 | } else if r == "move" { 35 | ani.Move() 36 | } else if r == "speak" { 37 | ani.Speak() 38 | } else { 39 | fmt.Println("Incorrect input. Try again") 40 | } 41 | } 42 | } 43 | 44 | func (animal *Animal) Eat() { 45 | fmt.Println("I eat", animal.food) 46 | } 47 | 48 | func (animal *Animal) Move() { 49 | fmt.Println("I", animal.locomotion) 50 | } 51 | 52 | func (animal *Animal) Speak() { 53 | fmt.Println("I", animal.noise) 54 | } 55 | -------------------------------------------------------------------------------- /Functions, Methods, and Interfaces in Go/bubbleSort/bubbleSort.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | func main() { 8 | var x int 9 | var arr []int 10 | for i := 0; i < 10; i++ { 11 | fmt.Println("Enter a no.") 12 | fmt.Scanln(&x) 13 | arr = append(arr, x) 14 | } 15 | sort := bubbleSort(arr) 16 | fmt.Println(sort) 17 | } 18 | 19 | func bubbleSort(arr []int) []int { 20 | for i := len(arr) - 1; i >= 0; i-- { 21 | for j := 0; j < i; j++ { 22 | if arr[j] > arr[j+1] { 23 | arr[j], arr[j+1] = arr[j+1], arr[j] 24 | } 25 | } 26 | } 27 | return arr 28 | } 29 | -------------------------------------------------------------------------------- /Functions, Methods, and Interfaces in Go/genDisp/gendisp.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | func main() { 8 | var a, v0, s0, t float64 9 | fmt.Println("Enter the acceleration: ") 10 | fmt.Scanln(&a) 11 | fmt.Println("Enter the initial velocity: ") 12 | fmt.Scanln(&v0) 13 | fmt.Println("Enter the initial displacement: ") 14 | fmt.Scanln(&s0) 15 | fn := GenDisplaceFn(a, v0, s0) 16 | fmt.Println("Enter the value of time t: ") 17 | fmt.Scanln(&t) 18 | fmt.Println("Displacement:", fn(t)) 19 | } 20 | 21 | func GenDisplaceFn(a, v0, s0 float64) func(float64) float64 { 22 | return func(t float64) float64 { 23 | return s0 + v0*t + 0.5*a*t*t 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Getting Started with Go/findian/findian.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | var first string 7 | fmt.Scanln(&first) 8 | cond1 := 0;cond2 := 0;cond3 := 0 9 | for i, c := range first { 10 | if i == 0 && c == 'i' || c == 'I' { 11 | cond1 = 1 12 | } else if c == 'a' || c == 'A' { 13 | cond2 = 1 14 | } else if i == len(first)-1 && c == 'n' || c == 'N' { 15 | cond3 = 1 16 | } 17 | } 18 | if cond1 == 1 && cond2 == 1 && cond3 == 1 { 19 | fmt.Println("Found") 20 | } else { 21 | fmt.Println("Not Found") 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Getting Started with Go/hello/hello.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | fmt.Println("Hello world!") 7 | } 8 | -------------------------------------------------------------------------------- /Getting Started with Go/makejson/makejson.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | ) 7 | 8 | func main() { 9 | m := make(map[string]string) 10 | var x string 11 | var y string 12 | fmt.Println("Enter your name") 13 | fmt.Scanln(&x) 14 | fmt.Println("Enter your address") 15 | fmt.Scanln(&y) 16 | m["name"] = x 17 | m["address"] = y 18 | json, err := json.MarshalIndent(m, "", "\t") 19 | if err != nil { 20 | fmt.Println(err) 21 | } 22 | fmt.Println(string(json)) 23 | } 24 | -------------------------------------------------------------------------------- /Getting Started with Go/read/read.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "bufio" 5 | "fmt" 6 | "os" 7 | "strings" 8 | ) 9 | 10 | type Person struct { 11 | fname string 12 | lname string 13 | } 14 | 15 | func main() { 16 | scanner := bufio.NewScanner(os.Stdin) 17 | fmt.Println("Enter file name:") 18 | scanner.Scan() 19 | fileName := scanner.Text() 20 | var fileHandler *os.File 21 | slice := make([]Person, 0, 1) 22 | 23 | for { 24 | fi, err := os.Open(fileName) 25 | if err != nil { 26 | fmt.Printf("ERROR: %v\n", err) 27 | fmt.Println("Please Enter valid file name:") 28 | scanner.Scan() 29 | fileName = scanner.Text() 30 | } else { 31 | fileHandler = fi 32 | break 33 | } 34 | } 35 | fileScanner := bufio.NewScanner(fileHandler) 36 | var arr []string 37 | 38 | for fileScanner.Scan() { 39 | arr = strings.Split(fileScanner.Text(), " ") 40 | slice = append(slice, Person{arr[0], arr[1]}) 41 | } 42 | 43 | fileHandler.Close() 44 | 45 | for _, person := range slice { 46 | fmt.Printf("%v - %v\n", person.fname, person.lname) 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Getting Started with Go/slice/slice.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "sort" 6 | "strconv" 7 | ) 8 | 9 | func main() { 10 | var s []int 11 | var x string 12 | fmt.Scanln(&x) 13 | for x != "X" { 14 | a, _ := strconv.Atoi(x) 15 | s = append(s, a) 16 | sort.Ints(s) 17 | fmt.Println(s) 18 | fmt.Scanln(&x) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Getting Started with Go/trunc/trunc.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | var x int 7 | fmt.Println("Enter a Float.") 8 | fmt.Scan(&x) 9 | fmt.Println(int(x)) 10 | } 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Piyushh Bhutoria 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Coursera: Programming with Google Go Specialisation 2 | 3 | > Don't copy the exact code here or you will be banned from Coursera 4 | 5 | ### Getting Started with Go 6 | 7 | [Programming assignments for Getting Started with Go](https://www.coursera.org/learn/golang-getting-started) 8 | 9 | **WEEK 1:** Getting Started with Go 10 | [Hello World](Getting%20Started%20with%20Go/hello/hello.go) 11 | 12 | **WEEK 2:** Basic Data Types 13 | [Truncation](Getting%20Started%20with%20Go/trunc/trunc.go) 14 | [Find IAN](Getting%20Started%20with%20Go/findian/findian.go) 15 | 16 | **WEEK 3:** Composite Data Types 17 | [Slice](Getting%20Started%20with%20Go/slice/slice.go) 18 | 19 | **WEEK 4:** Protocols and Formats 20 | [Make JSON](Getting%20Started%20with%20Go/makejson/makejson.go) 21 | [Read File](Getting%20Started%20with%20Go/read/read.go) 22 | 23 | ### Functions, Methods, and Interfaces in Go 24 | 25 | [Programming assignments for Functions, Methods, and Interfaces in Go](https://www.coursera.org/learn/golang-functions-methods) 26 | 27 | **WEEK 1:** Functions & Organization 28 | [Bubble Sort](Functions%2C%20Methods%2C%20and%20Interfaces%20in%20Go/bubbleSort/bubbleSort.go) 29 | 30 | **WEEK 2:** Function types 31 | [Generate Displacement](Functions%2C%20Methods%2C%20and%20Interfaces%20in%20Go/genDisp/gendisp.go) 32 | 33 | **WEEK 3:** Object Orientation in Go 34 | [Animals](Functions%2C%20Methods%2C%20and%20Interfaces%20in%20Go/animal/animal.go) 35 | 36 | **WEEK 4:** Interfaces for Abstraction 37 | [Animal Query](Functions%2C%20Methods%2C%20and%20Interfaces%20in%20Go/Animal%20interface/animalQuery.go) 38 | 39 | ### Concurrency in Go 40 | 41 | [Programming assignments for Concurrency in Go](https://www.coursera.org/learn/golang-concurrency) 42 | 43 | **WEEK 1:** Why Use Concurrency? 44 | [Moore's Law](Concurrency%20in%20Go/week1/ass1.pdf) 45 | 46 | **WEEK 2:** Concurrency basics 47 | [Race condition](Concurrency%20in%20Go/raceCondition/race.go) 48 | 49 | **WEEK 3:** Threads in Go 50 | [Array sort](Concurrency%20in%20Go/arraySort/arraySort.go) 51 | 52 | **WEEK 4:** Synchronized Communication 53 | [Philosopher](Concurrency%20in%20Go/philosopher/philosopher.go) 54 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-leap-day 2 | --------------------------------------------------------------------------------