This file contains 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 the react library | |
import * as React from "react"; | |
//ExampleWidget inherits functionality of React.Component | |
//we also need to export default to make this widget available | |
//to the rest of our app | |
export default class ExampleWidget extends React.Component { | |
//constructor is called when the widget is created | |
constructor(props) { |
This file contains 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
walls = [2,5,1,3,1,2,1,7,7,6] | |
lmax = 0 | |
rmax = 0 | |
total = 0 | |
#find rmax | |
for i in range(0, len(walls)): | |
if walls[i] > walls[rmax]: | |
rmax = i |