This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity ^0.4.17; | |
| contract Lottery{ | |
| address public manager; | |
| address[] public players; | |
| function Lottery() public { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| // Round returns the nearest integer, rounding ties away from zero. | |
| func merge(a, b []int) []int { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "errors" | |
| "fmt" | |
| ) | |
| //Tree struct to define the tree | |
| type Tree struct { | |
| Value int |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "errors" | |
| "fmt" | |
| ) | |
| //BFS to print the tree in breadth first fashion | |
| func BFS(tree *Tree) []int { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //BFS to print the tree in breadth first fashion | |
| func BFS(tree *Tree) []int { | |
| queue := []*Tree{} | |
| queue = append(queue, tree) | |
| result := []int{} | |
| return BFSUtil(queue, result) | |
| } | |
| //BFSUtil to help BFS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Traversal Interfcae to implement | |
| type Traversal interface { | |
| Initialize() []int | |
| PrintTraversal(stack []*Tree, res []int, visited map[int]bool) []int | |
| util(stack []*Tree, res []int, visited map[int]bool) ([]int, []*Tree) | |
| } | |
| type defImplement struct { | |
| } |
OlderNewer