🔲 Cap 06: Matrizes Bidimensionais, Alocação Contígua e Algoritmos Lineares - Exemplos Práticos
Código executável completo demonstrando os conceitos abordados em Go.
🗺️ Fluxo de Execução
flowchart LR
MAT["Matriz 2D: [3][3]int"] --> R0["Linha 0: [0,0] [0,1] [0,2]"]
MAT --> R1["Linha 1: [1,0] [1,1] [1,2]"]
MAT --> R2["Linha 2: [2,0] [2,1] [2,2]"]
style MAT fill:#e1f5fe,stroke:#03a9f4,stroke-width:2px
style R0 fill:#e8f5e9,stroke:#4caf50,stroke-width:1px
📄 Código de Demonstração (matriz.go)
package main
import "fmt"
func main() {
\var tabuleiro [3][3]int
\tabuleiro[1][1] = 7 // Posição central
\fmt.Printf("Centro: %d\n", tabuleiro[1][1])
}
🚀 Saída Esperada no Terminal
$ go run matriz.go
Centro: 7
🧭 Navegação Rápida
| 📖 Teoria | 📊 Slides | 🧠 Quiz | 💻 Exemplos | 🧩 Exercícios | | :— | :— | :— | :— | :— | | Ler Tópico | Ver Slides | Fazer Quiz | Ver Código | Praticar |