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 <iostream> | |
#include <string> | |
#include <stack> | |
using namespace std; | |
bool verification(string s) { | |
stack<char> stq; | |
for (unsigned int i = 0; i < s.length(); i++) { |
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 <iostream> | |
#include <sstream> | |
#include <map> | |
#include <vector> | |
using namespace std; | |
int main() { | |
string text; | |
string word; |
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 packLists(a) { | |
if (!a.length) { | |
return [[]]; | |
} else if (a.length == 1) { | |
return [[a[0]]]; | |
} | |
var c = [a[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
/* (**) Determine the prime factors of a given positive integer. | |
* Construct a flat list containing the prime factors in ascending order. | |
* Example: | |
* * (prime-factors 315) | |
* (3 3 5 7) | |
*/ | |
function prime(n) { | |
if (n < 2) { |
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
/* (**) Determine the prime factors of a given positive integer. | |
* Construct a flat list containing the prime factors in ascending order. | |
* Example: | |
* * (prime-factors 315) | |
* (3 3 5 7) | |
*/ | |
function prime(n) { | |
if (n < 2) { |
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
/* (**) Determine the prime factors of a given positive integer. | |
* Construct a flat list containing the prime factors in ascending order. | |
* Example: | |
* * (prime-factors 315) | |
* (3 3 5 7) | |
*/ | |
function prime(n) { | |
if (n < 2) { |
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
/* (**) Determine the prime factors of a given positive integer. | |
* Construct a flat list containing the prime factors in ascending order. | |
* Example: | |
* * (prime-factors 315) | |
* (3 3 5 7) | |
*/ | |
function prime(n) { | |
if (n < 2) |
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
/* (**) Determine the prime factors of a given positive integer. | |
* Construct a flat list containing the prime factors in ascending order. | |
* Example: | |
* * (prime-factors 315) | |
* (3 3 5 7) | |
*/ | |
function prime(n) { | |
if (n < 2) { |
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
/* (**) Determine the prime factors of a given positive integer. | |
* Construct a flat list containing the prime factors in ascending order. | |
* Example: | |
* * (prime-factors 315) | |
* (3 3 5 7) | |
*/ | |
function prime(n) { | |
if (n < 2) { |
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
/* (**) Determine the prime factors of a given positive integer. | |
* Construct a flat list containing the prime factors in ascending order. | |
* Example: | |
* * (prime-factors 315) | |
* (3 3 5 7) | |
*/ | |
function prime(n) { | |
if (n < 2) { | |
return false; |
NewerOlder