V | E | V + E | Time | Space |
---|---|---|---|---|
100 | 100 | 200 | 2 | 301832 |
1000 | 1000 | 2000 | 5 | 346624 |
10000 | 15000 | 25000 | 22 | 788248 |
100000 | 150000 | 250000 | 118 | 5198408 |
500000 | 550000 | 1050000 | 1808 | 24797504 |
1000000 | 1100000 | 2100000 | 3624 | 49297504 |
2000000 | 2500000 | 4500000 | 9438 | 98298272 |
3000000 | 3000000 | 6000000 | 10022 | 147298544 |
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
package poof.core; | |
import java.util.HashMap; | |
public class Directory extends FileSystemEntitiy { | |
/** | |
* | |
*/ | |
private static final long serialVersionUID = -1968533951935404039L; |
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
#ifndef __BENEFICIARY_H__ | |
#define __BENEFICIARY_H__ | |
// Abstarct class | |
class Beneficiary { | |
public: | |
Beneficiary() { } | |
virtual int totalHelpRecieved() = 0; | |
virtual void addHelpRecieved(int value) = 0; |
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
#include "Dog.h" | |
#include <iostream> | |
#include <string> | |
Dog::Dog(int age, std::string name, int weight) : Animal(age, name), _weight(weight) {} | |
Dog::~Dog() {}; | |
void Dog::bark() | |
{ std::cout << ((Animal*)this)->name() + " says: \"ruff, ruff!\"" << std::endl; } |
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
#include "Animal.h" | |
#include <string> | |
#include<iostream> | |
Animal::Animal(int age, std::string name) : _name(name), _age(age) { } | |
Animal::~Animal() { } | |
void Animal::sleep(){ printf("Shhh! %s is sleeping...\n", this->name); } |
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
// Works | |
std::ostream &operator<<(std::ostream &o, const Cat cat){ | |
o << (Animal&)cat << " Weight: " << cat.weight(); | |
return o; | |
} | |
//Doesn't work | |
std::ostream &operator<<(std::ostream &o, const Cat cat){ | |
o << (Animal*)cat << " Weight: " << cat.weight(); | |
return o; |
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
#include "Animal.h" | |
#include <string> | |
#include<iostream> | |
Animal::Animal(int age, std::string name) : name(name), age(age) { } | |
Animal::~Animal() { } | |
void Animal::sleep(){ printf("Shhh! %s is sleeping...\n", this->name); } |
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
public AndGateTwo() { gateOne = gateTwo = false; } | |
public AndGateTwo(boolean bool) { gateOne = gateTwo = bool; } | |
public AndGateTwo(boolean gOneBool, boolean gTwoBool) { gateOne = gOneBool; gateTwo = gTwoBool; } |
##Clues To Implement
- trioLeft(Peca, Linha, Coluna, Tabuleiro)
- trioRight(Peca, Linha, Coluna, Tabuleiro)
- cobra(Peca, Linha, Coluna, Tabuleiro)
- tSimples(Peca, Linha, Coluna, Tabuleiro)
- tLeft(Peca, Linha, Coluna, Tabuleiro)
- tRight(Peca, Linha, Coluna, Tabuleiro)
- tInvertido(Peca, Linha, Coluna, Tabuleiro)
- cantoTopLeft(Peca, Linha, Coluna, Tabuleiro)
- cantoTopRight(Peca, Linha, Coluna, Tabuleiro)
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
function textToASCII($text){ | |
/* recieves a chunk of text and returns the number resulting from converting all of the caharacters to ASCII */ | |
$asciified = 0; // stores the "asciified" text | |
for ($i = 0; $i<strlen($text); $i++){ | |
if (ord($text[$i]) < 10) | |
// if the character's ASCII code is less than 10, multiplay by 10, so that that integer can be "concatenated" | |
$asciified *= 10; | |
else if (ord($text[$i]) < 100) | |
// if the character's ASCII code is less than 100, multiplay by 100, so that that integer can be "concatenated" | |
$asciified *= 100; |