View t10e24.rom2int.cpp
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
// t10e24.rom2int.cpp | |
// juanfc 2022-01-16 | |
// https://gist.github.com/f47e281ad205395051fd1aaf8f0aa13a | |
#include <iostream> | |
using namespace std; | |
void test(string s); | |
int main() |
View t10e23.lookandsay.cpp
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
// t10e23.lookandsay.cpp | |
// juanfc 2022-01-16 | |
// | |
#include <iostream> | |
using namespace std; | |
string lookandsay(string s); | |
int main() |
View t10e22.wordpattern.cpp
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
// t10e22.wordpattern.cpp | |
// juanfc 2022-01-16 | |
// | |
#include <iostream> | |
using namespace std; | |
void test(string s1, string s2); |
View t10e22.hamming.cpp
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
// t10e22.hamming.cpp | |
// juanfc 2022-01-16 | |
// | |
#include <iostream> | |
using namespace std; | |
void test(string s1, string s2); |
View t10e21.rgbtohex.cpp
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
// t10e21.rgbtohex.cpp | |
// juanfc 2022-01-16 | |
// | |
#include <iostream> | |
#include <array> | |
using namespace std; | |
typedef array<int,3> TRGB; |
View t10e20.isvalidean.cpp
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
// t10e20.isvalidean.cpp | |
// juanfc 2022-01-16 | |
// | |
#include <iostream> | |
using namespace std; | |
void test(string s); | |
int main() |
View t10e19.validbraces.cpp
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
// t10e19.validbraces.cpp | |
// juanfc 2022-01-15 | |
// | |
#include <iostream> | |
using namespace std; | |
const string OPENING = "([{<“‘"; | |
const string CLOSING = ")]}>”’"; |
View t10e18.nextPiece.cpp
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
// t10e18.nextPiece.cpp | |
// juanfc 2022-01-15 | |
// | |
#include <iostream> | |
using namespace std; | |
string nextPiece(string s, char sep='\0'); | |
int main() |
View t10e18.stringglobsearch.cpp
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
// t10e18.stringglobsearch.cpp | |
// juanfc 2022-01-14 | |
// | |
#include <iostream> | |
using namespace std; | |
int find(string s, string ss, int from=0); | |
int main() |
View t10e16.stringdiff.cpp
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
// t10e16.stringdiff.cpp | |
// juanfc 2022-01-14 | |
// | |
#include <iostream> | |
#include <array> | |
using namespace std; | |
string diff(string a, string b); |