<commit_before>package main

import (
	"fmt"

	ds "github.com/mustafa-zidan/algorithms/datastructures"
	"github.com/mustafa-zidan/algorithms/search"
)

func main() {
	queue := ds.NewQueue()
	queue.Push(2)
	queue.Push(3)
	queue.Push(4)
	for queue.IsEmpty() {
		fmt.Println(queue.Pop())
	}

	stack := ds.NewStack()
	stack.Push(2)
	stack.Push(3)
	stack.Push(4)
	fmt.Println(stack.Pop())
	fmt.Println(stack.Pop())
	fmt.Println(stack.Pop())

	var root *ds.AVLNode
	keys := []int{2, 6, 1, 3, 5, 7, 16, 15, 14, 13, 12, 11, 8, 9, 10}
	for _, key := range keys {
		root = ds.Insert(root, key)
	}

	tree := &ds.BinarySearchTree{}
	for _, key := range keys {
		tree.Insert(key)
	}
	fmt.Println(tree.InOrderTreeWalk())

	ds.InOrder(root, func(node *ds.AVLNode) {
		fmt.Println(node.Val, node.Height)
	})

	g := &ds.Graph{}

	fillGraph(g)
	g.String()
	search.GraphBFTraverse(g, func(v *ds.Vertex) {
		fmt.Printf("%v ", v)
	})

	search.GraphDFTraverse(g, func(v *ds.Vertex) {
		fmt.Printf("%v\n", v)
	})
}
<commit_msg>add graph<commit_after>package main

import (
	"fmt"

	ds "github.com/mustafa-zidan/algorithms/datastructures"
	"github.com/mustafa-zidan/algorithms/search"
)

func main() {
	queue := ds.NewQueue()
	queue.Push(2)
	queue.Push(3)
	queue.Push(4)
	for queue.IsEmpty() {
		fmt.Println(queue.Pop())
	}

	stack := ds.NewStack()
	stack.Push(2)
	stack.Push(3)
	stack.Push(4)
	for stack.IsEmpty() {
		fmt.Println(stack.Pop())
	}

	var root *ds.AVLNode
	keys := []int{2, 6, 1, 3, 5, 7, 16, 15, 14, 13, 12, 11, 8, 9, 10}
	for _, key := range keys {
		root = ds.Insert(root, key)
	}

	tree := &ds.BinarySearchTree{}
	for _, key := range keys {
		tree.Insert(key)
	}
	fmt.Println(tree.InOrderTreeWalk())

	ds.InOrder(root, func(node *ds.AVLNode) {
		fmt.Println(node.Val, node.Height)
	})

	g := &ds.Graph{}

	fillGraph(g)
	g.String()
	search.GraphBFTraverse(g, func(v *ds.Vertex) {
		fmt.Printf("%v ", v)
	})

	search.GraphDFTraverse(g, func(v *ds.Vertex) {
		fmt.Printf("%v\n", v)
	})
}

{'fraction_non_alphanumeric': 0.19454269833249116, 'fraction_numerical': 0.02829711975745326, 'mean_word_length': 3.7596153846153846, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5113384', 'n_tokens_mistral': 943, 'n_tokens_neox': 869, 'n_words': 157}