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
    
  
  
    
  | .App { | |
| text-align: center; | |
| } | |
| .App-logo { | |
| height: 40vmin; | |
| pointer-events: none; | |
| } | |
| @media (prefers-reduced-motion: no-preference) { | 
  
    
      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
    
  
  
    
  | body { | |
| margin: 0; | |
| font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', | |
| 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', | |
| sans-serif; | |
| -webkit-font-smoothing: antialiased; | |
| -moz-osx-font-smoothing: grayscale; | |
| } | |
| code { | 
  
    
      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 React from "react"; | |
| import TreeView from "@material-ui/lab/TreeView"; | |
| import ExpandMoreIcon from "@material-ui/icons/ExpandMore"; | |
| import ChevronRightIcon from "@material-ui/icons/ChevronRight"; | |
| import TreeItem from "@material-ui/lab/TreeItem"; | |
| import TreeNode from "./TreeNode"; | |
| const mockApiCall = async () => { | |
| return new Promise((resolve) => { | |
| setTimeout(() => { | 
  
    
      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
    
  
  
    
  | export default class TreeNode { | |
| constructor(props) { | |
| this.root = props.root; | |
| this.id = props.id; | |
| this.name = props.name; | |
| this.children = props.children || []; | |
| } | |
| traverse(callback) { | |
| function goThrough(node) { | 
  
    
      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
    
  
  
    
  | var AWS = require('aws-sdk'); | |
| exports.handler = async(event) = > { | |
| const users = await getUsers(event) | |
| const response = { | |
| statusCode: 200, | |
| headers: { | |
| "Access-Control-Allow-Origin": "*" | |
| }, | |
| body: JSON.stringify(users), | 
  
    
      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 math | |
| def create_rounds(users, bracketId): | |
| round_names = ['Final', 'Semifinal', 'Quarterfinal', '1/8 Final', '1/16 Final', '1/32 Final', '1/64 Final'] | |
| def divide_users(arr, depth, max_depth): | |
| if len(arr) < 2: | |
| return | |
| complement = 2 ** (depth + 2) + 1 | |
| if complement - arr[0] <= max_depth: | 
  
    
      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
    
  
  
    
  | git remote add codecommit https://git-codecommit.<YOUR AWS REGION ID>.amazonaws.com/v1/repos/PingPongBrackets | 
  
    
      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
    
  
  
    
  | version: 0.1 | |
| phases: | |
| pre_build: | |
| commands: | |
| - echo Installing source NPM dependencies... | |
| - npm install | |
| build: | |
| commands: | |
| - echo Build started on `date` | |
| - npm run build | 
  
    
      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
    
  
  
    
  | function findContigSequence(inputArr, target) { | |
| let output = false; | |
| for (let i = 0; i < inputArr.length; i++) { // iterate each item in arr | |
| const currentVal = inputArr[i]; | |
| if (currentVal === target) { | |
| output = true; // return true if any item is equal to target | |
| return; | |
| } else { | |
| let nextIndex = i + 1; // inspect the next value in the array | |
| let sum = currentVal; // keep track of sums | 
NewerOlder