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 java.util.Random; | |
/** | |
* | |
* @author Vijini | |
*/ | |
//Main class | |
public class SimpleDemoGA { |
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
<?php | |
function binarySearch($list,$itemToBeFound){ | |
$firstIndex = 0; | |
$lastIndex = (count($list) - 1); | |
$found = false; | |
while($firstIndex <= $lastIndex && $found == false){ | |
$midpoint = floor(($firstIndex + $lastIndex) / 2); | |
if ($itemToBeFound == $list[$midpoint]){ |
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
#!/usr/bin/env bash | |
sudo -i; | |
apt-get update; | |
apt-get install --yes \ | |
git \ | |
bison \ | |
autoconf \ |