Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
1
Task/Reverse-a-string/PARI-GP/reverse-a-string-1.parigp
Normal file
1
Task/Reverse-a-string/PARI-GP/reverse-a-string-1.parigp
Normal file
|
|
@ -0,0 +1 @@
|
|||
reverse(s)=concat(Vecrev(s))
|
||||
12
Task/Reverse-a-string/PARI-GP/reverse-a-string-2.parigp
Normal file
12
Task/Reverse-a-string/PARI-GP/reverse-a-string-2.parigp
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
\\ Return reversed string str.
|
||||
\\ 3/3/2016 aev
|
||||
sreverse(str)={return(Strchr(Vecrev(Vecsmall(str))))}
|
||||
|
||||
{
|
||||
\\ TEST1
|
||||
print(" *** Testing sreverse from Version #2:");
|
||||
print(sreverse("ABCDEF"));
|
||||
my(s,sr,n=10000000);
|
||||
s="ABCDEFGHIJKL";
|
||||
for(i=1,n, sr=sreverse(s));
|
||||
}
|
||||
11
Task/Reverse-a-string/PARI-GP/reverse-a-string-3.parigp
Normal file
11
Task/Reverse-a-string/PARI-GP/reverse-a-string-3.parigp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
\\ Version #1 upgraded to complete function. Practically the same.
|
||||
reverse(str)={return(concat(Vecrev(str)))}
|
||||
|
||||
{
|
||||
\\ TEST2
|
||||
print(" *** Testing reverse from Version #1:");
|
||||
print(reverse("ABCDEF"));
|
||||
my(s,sr,n=10000000);
|
||||
s="ABCDEFGHIJKL";
|
||||
for(i=1,n, sr=reverse(s));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue