Sorting only odd elements of an associative array - php

If I have an associative array like
3 => 50
4 => 12
5 => 45
6 => 89
7 => 5
8 => 1
Now I want to sort only the values of odd keys in ascending order.
The output should be:
7 => 5
4 => 12
5 => 45
6 => 89
3 => 50
8 => 1

To maintain original keys, you have to first separate even and odd elements:
$odd = $even = array();
array_walk( $array, function( $val, $key ) use ( &$odd, &$even ) { ( $key % 2 ) ? $odd[$key] = $val : $even[$key] = $val; });
Then, sort $odd array:
asort( $odd );
At the end, you reconstruct the array:
$array = array();
while( current( $odd ) || current( $even ) )
{
if( current( $odd ) ) $array[key($odd)] = current( $odd );
if( current( $even ) ) $array[key($even)] = current( $even );
next( $odd );
next( $even );
}
print_r( $array );
eval.in demo
Note that your question is a bit ambiguous: it's not totally clear if you base odd/even on key value or key position: this solution consider key values and — trough while and if checks — guarantee that all values are preserved, even if you have more even than odd keys (or vice-versa).

Try this:
<?php
$array = array(
3 => 50,
4 => 12,
5 => 45,
6 => 89,
7 => 5,
8 => 1
);
$oddElems = array();
$evenElems = array();
$i = 0;
foreach($array as $index => $value)
{
if($i % 2 == 0)
$oddElems[$index] = $value;
else
$evenElems[$index] = $value;
$i++;
}
//sort odd elements
asort($oddElems);
$result = array();
while(!empty($oddElems) || !empty($evenElems))
{
$lastEvenElemKey = array_keys($evenElems, end($evenElems))[0];
$evenElem = array_pop($evenElems);
if($evenElem !== null)
$result[$lastEvenElemKey] = $evenElem;
$lastOddElemKey = array_keys($oddElems, end($oddElems))[0];
$oddElem = array_pop($oddElems);
if($oddElem !== null)
$result[$lastOddElemKey] = $oddElem;
}
echo '<pre>';
$result = array_reverse($result, true);
print_r($result);
Result is:
Array
(
[7] => 5
[4] => 12
[5] => 45
[6] => 89
[3] => 50
[8] => 1
)

This is how you could do this in PHP, is this what you are looking for ?
$array(3 => 50, 4 => 12, 5 => 45, 6 => 89, 7 => 5, 8 => 1);
function sort_it($array) {
$final_array[];
$array_only_odd_keys[];
$array_only_odd_stuff[];
$array_only_even_keys[];
$array_only_even_stuff[];
foreach($array as $key => $value) {
if($key & 1) {
//Key is odd
array_push($array_only_odd_stuff, $key => $value);
array_push($array_only_odd_keys, $key);
}
else {
// Key is even
array_push($array_only_even_stuff, $key => $value);
array_push($array_only_even_keys, $key);
}
}
$array_only_odd_keys = asort($array_only_odd_keys);
for ($x = 0; $x <= count($array)/2; $x++) {
if ($x & 1) {
array_push($final_array, $array_only_odd_keys[$x], $array_only_odd_stuff[$array_only_odd_keys[$x]]);
}
else {
array_push($final_array, $array_only_even_keys[$x], $array_only_odd_stuff[$array_only_even_keys[$x]]);
}
}
return $final_array;
This is how i'd do it in PHP though only if you want the final array to switch between even and odd keys like in your example.

The easiest way is probably to separate the array into even and odd arrays, sort the odd array, and then glue them back together:
$odd = $even = [];
foreach (array_chunk($myArray, 2, true) as $pair) {
$odd += array_slice($pair, 0, 1, true);
$even += array_slice($pair, 1, 1, true);
}
asort($odd);
$result = [];
for ($i = 0; $i < count($odd); $i++) {
$result += array_slice($odd, $i, 1, true);
$result += array_slice($even, $i, 1, true);
}
This rather naïve implementation assumes there is an equal number of odd and even numbers, they're always alternating and the array starts with an odd number.

Related

Find combination of array keys with values

In order to optimize the output I recently ran into a situation where I have to get the all the combinations of array keys inside an array. I looked into several places (including StackOverflow) but could not find the solution since most are related to permutation rather than combination.
Given this input
$input = ['jack' => 11, 'moe' => 12, 'shane' => 12];
Output should be something like this (the order inside an array does not matter).
$output = [
['jack' => 11],
['jack' => 11, 'moe' => 12]
['jack' => 11, 'moe' => 12, 'shane' => 12]
['moe' => 12],
['moe' => 12, 'shane' => 12]
['shane' => 12],
['shane' => 12, 'jack' => 11]
];
I tried this but after third iteration it does not work.
function combination(array $inputs, array $temp, &$collect) {
if (!empty($temp)) {
$collect[] = $temp;
}
for ($i = 0; $i < sizeof($inputs); $i++) {
$inputCopy = $inputs;
$elem = array_splice($inputCopy, $i, 1);
if (count($inputCopy) > 0) {
$temp[array_keys($elem)[0]] = array_values($elem)[0];
combination($inputCopy, $temp, $collect);
} else {
$temp[array_keys($elem)[0]] = array_values($elem)[0];
$collect[] = $temp;
$temp = [];
}
$i++;
}
}
Though I need this in PHP even Python (without using itertools combination), Java, Javascript will work for me.
I have found a way of doing what you want, but definitely, this is not a "fancy" solution. I would suggest you to work a little bit with it to find something better, but at least this gives you the result.
Here you go :
<?php
$baseArray = [
"joe" => 11,
"molly" => 12,
"sam" => 13,
];
function getAllPermutations($array = []) {
if (empty($array)) {
return [];
}
$result = [];
foreach ($array as $key => $value) {
unset($array[$key]);
$subPermutations = getAllPermutations($array);
$result[] = [$key => $value];
foreach ($subPermutations as $sub) {
$result[] = array_merge([$key => $value] , $sub);
}
}
return $result;
}
print_r(getAllPermutations($baseArray));
Output being :
Array
(
[0] => Array
(
[joe] => 11
)
[1] => Array
(
[joe] => 11
[molly] => 12
)
[2] => Array
(
[joe] => 11
[molly] => 12
[sam] => 13
)
[3] => Array
(
[joe] => 11
[sam] => 13
)
[4] => Array
(
[molly] => 12
)
[5] => Array
(
[molly] => 12
[sam] => 13
)
[6] => Array
(
[sam] => 13
)
) }
Hope this helped.
You read about really clever non-recursive algorithm here: PHP: Find every combination of an Array. You can adopt it (mostly copy and paste) to write generator function:
function keyCombinations($array)
{
$keys = array_keys($array);
$num = count($keys);
$total = pow(2, $num);
for ($i = 1; $i < $total; $i++) {
$combination = [];
for ($j = 0; $j < $num; $j++) {
if (pow(2, $j) & $i) {
$key = $keys[$j];
$combination[$key] = $array[$key];
}
}
yield $combination;
}
}
One important point here. In the original article $i initialized with 0, we initialize it with 1 to exclude empty array from the result.
Having this function you can get all combinations:
foreach (keyCombinations($input) as $combination) {
print_r($combination);
}
Here is working demo.
If, in your final combination, you include the empty set, your problem is equivalent to enumerating a binary number of "n" bits. Where "n" is the number of elements in your set.
You need a recursive algorithm like this one:
def comb(initialSet, results=[], currentIndex=0, currentResult=[]):
if currentIndex >= len(initialSet):
results.append( currentResult[:] )
else:
currentResult.append( initialSet[currentIndex] )
comb(initialSet, results, currentIndex + 1, currentResult)
currentResult.pop()
comb(initialSet, results, currentIndex + 1, currentResult)
return results

Retrieve and remove duplicate values from an associative array

I have associative array like below
$arr = [1=>0, 2=>1, 3=>1, 4=>2, 5=>2, 6=>3]
I would like to remove the duplicate values from the initial array and return those duplicates as as a new array of duplicate arrays. So I would end up with something like;
$arr = [1=>0, 6=>3]
$new_arr = [[2=>1, 3=>1],[4=>2, 5=>2]]
Does PHP provide such a function or if not how would I achieve this?
I've tried;
$array = [];
$array[1] = 5;
$array[2] = 5;
$array[3] = 4;
$array[5] = 6;
$array[7] = 7;
$array[8] = 7;
$counts = array_count_values($array);
print_r($counts);
$duplicates = array_filter($array, function ($value) use ($counts) {
return $counts[$value] > 1;
});
print_r($duplicates);
$result = array_diff($array, $duplicates);
print_r($result);
This outputs;
[1] => 5
[2] => 5
[7] => 7
[8] => 7
&
[3] => 4
[5] => 6
which is almost what I want.
Code
The following works for me... Tho I make no promises in regards to complexity and performance, but there's the general idea... Also, I haven't written PHP for many years now, so bear that in mind.
<?php
function nubDups( $arr ) {
$seen = [];
$dups = [];
foreach ( $arr as $k => $v) {
if ( array_key_exists( $v, $seen ) ) {
// duplicate found!
if ( !array_key_exists( $v, $dups ) )
$dups[$v] = [$seen[$v]];
$dups[$v][] = $k;
} else
// First time seen, record!
$seen[$v] = $k;
}
$uniques = [];
foreach ( $seen as $v => $k ) {
if ( !array_key_exists( $v, $dups ) ) $uniques[$k] = $v;
}
return [$uniques, $dups];
}
function nubDups2( $arr ) {
for ( $seen = $dups = []; list( $k, $v ) = each( $arr ); )
if ( key_exists( $v, $dups ) ) $dups[$v][] = $k;
else if ( key_exists( $v, $seen ) ) $dups[$v] = [$seen[$v], $k];
else $seen[$v] = $k;
return [array_flip( array_diff_key( $seen, $dups ) ), $dups];
}
$arr = [0, 1, 4, 1, 2, 2, 3];
print_r( nubDups( $arr ) );
print_r( nubDups2( $arr ) );
Output (for both)
$ php Test.php
Array
(
[0] => 0
[2] => 4
[6] => 3
)
Array
(
[1] => Array
(
[0] => 1
[1] => 3
)
[2] => Array
(
[0] => 4
[1] => 5
)
)
Shortened
removed, specified as [(k, v)]: [(0, 0), (2, 4), (6, 3)]
duplicates, specified as [(v, [k])]: [(1, [1, 3]), (2, [4, 5])]
In Haskell
This version abuses hash tables for fast lookups.
A simpler version that almost does the same but ignores indexes, written in haskell:
-- | 'nubDupsBy': for a given list yields a pair where the fst contains the
-- the list without any duplicates, and snd contains the duplicate elements.
-- This is determined by a user specified binary predicate function.
nubDupsBy :: (a -> a -> Bool) -> [a] -> ([a], [a])
nubDupsBy p = foldl f ([], [])
where f (seen, dups) x | any (p x) seen = (seen, dups ++ [x])
| otherwise = (seen ++ [x], dups)

Count the number of numeric keys in an array

I'm using PHP 5.6, and I have the following array:
Array (
[0] => Array (
[id] => 1
[name] => James
)
[1] => Array (
[id] => 2
[name] => Tim
[children] => Array (
[0] => Array (
[id] => 4
[name] => Sam
)
[1] => Array (
[id] => 5
[name] => Florence
)
)
)
[2] => Array (
[id] => 3
[name] => Stephen
)
)
I'm trying to find a neat and fast way to count the number of people, which is the same as counting the number of numeric keys, which should be 5.
echo count($myarray); // 3 (only first level)
echo count($myarray, COUNT_RECURSIVE); // 16 (every key/value)
Is there a good way to do this with built-in PHP functions, or do I need to traverse the whole multidimensional array and count them manually..?
EDIT My array could end up being 1,000+ people (or more), with many many levels (an unknown number of levels).
It is important to note that, even if there were a PHP built-in (such as count($myarray, COUNT_RECURSIVE_NUMERIC);) internally, it would still be traversing the whole array, recursively. If you are worried about Out Of Memory errors, try pass-by-reference, which will not copy the array or the array items:
define('COUNT_RECURSIVE', 1);
function count_numeric_keys(&$array, $flags = 0) {
$count = 0;
foreach ($array as $key => $value) {
$count += (int) (is_numeric($key));
if ($flags & COUNT_RECURSIVE && is_array($value)) {
$count += count_numeric_keys($value, $flags);
}
}
return (int) $count;
}
$count = count_numeric_keys($array, COUNT_RECURSIVE);
Mayhaps?
Comparison with non-pass-by-reference, type-hint, and small benchmark:
define('COUNT_RECURSIVE', 1);
function count_numeric_keys(Array &$array, $flags = 0) {
$count = 0;
foreach ($array as $key => $value) {
$count += (int) (is_numeric($key));
if ($flags & COUNT_RECURSIVE && is_array($value)) {
$count += count_numeric_keys($value, $flags);
}
}
return (int) $count;
}
function count_numeric_keys_np(Array $array, $flags = 0) {
$count = 0;
foreach ($array as $key => $value) {
$count += (int) (is_numeric($key));
if ($flags & COUNT_RECURSIVE && is_array($value)) {
$count += count_numeric_keys_np($value, $flags);
}
}
return (int) $count;
}
$tpl_array = array(
1=>"one",
"two"=>"two",
3=>array(
1=>1,
"two"=>2
)
);
// Fill the array with both numeric and non-numeric
$array = array();
for($i = 1000; $i > 0; $i--) {
$array[] = $tpl_array;
}
for($i = 1000; $i > 0; $i--) {
$array["not a number $i"] = $tpl_array;
}
echo "Pre Memory: ".memory_get_usage(TRUE).PHP_EOL;
echo "Count: ".count_numeric_keys($array, COUNT_RECURSIVE).PHP_EOL;
echo "Reference Memory: ".memory_get_usage(TRUE)." current, ".memory_get_peak_usage(TRUE)." peak.\n";
count_numeric_keys_np($array, COUNT_RECURSIVE);
echo "No-Reference Memory: ".memory_get_usage(TRUE)." current, ".memory_get_peak_usage(TRUE)." peak.\n";
View it on IDEONE here.
ODDLY, having a reference on $value, like foreach($array as $key => &value) {} actually increased memory usage. Bizarre...
I just created this recursive function to do this for ya :P
function countNumericKeys($array)
{
$count = 0;
foreach ($array as $key => $value)
{
if (is_numeric($key))
{
$count ++;
}
if (is_array($value))
{
$count += countNumericKeys($value);
}
}
return $count;
}
// Test it!
$array = [
1=>"one",
"two"=>"two",
3=>[
1=>1,
"two"=>2
]
];
print countNumericKeys($array); // Output: 3, correct (in this case at least)!
Shortened the code so it uses ternary operators instead of the ifs that it was :P
function simpleCountNumericKeys($array)
{
$count = 0;
foreach ($array as $key => $value)
{
$count += is_numeric($key) ? 1 : 0;
$count += is_array($value) ? simpleCountNumericKeys($value) : 0;
}
return $count;
}
TEST USING array_keys -- only gets the top level keys of the array
function countArrayKeysNumeric($array)
{
$count = 0;
$keys = array_keys($array);
foreach ($keys as $key) $count += is_numeric($key) ? 1 :0;
return $count;
}
$array = [
1=>"one",
"two"=>"two",
3=>[
1=>1,
"two"=>2
]
];
print countArrayKeysNumeric($array);
Prints 2... :(

Getting specidic values from PHP arrays

Is there a way to get the first value from array, then the first value key + 3 ; then +6 then + 9 ans so on
Take this array for example,
array(1,2,5,14,19,2,11,3,141,199,52,24,16)
i want extract a value every 3 so the result would be
array(1,14,11,199,16)
Can i do that with existing PHP array function?
Use a for loop and increment the counter variable by 3.
for ($i = 0; $i <= count(your array); $i+3) {
echo $myarray[i]
}
The following is function that will handle extracting the values from a given array. You can specify the number of steps between each value and if the results should use the same keys as the original. This should work with regular and associative arrays.
<?php
function extractValues($array, $stepBy, $preserveKeys = false)
{
$results = array();
$index = 0;
foreach ($array as $key => $value) {
if ($index++ % $stepBy === 0) {
$results[$key] = $value;
}
}
return $preserveKeys ? $results : array_values($results);
}
$array = array(1, 2, 5, 14, 19, 2, 11, 3, 141, 199, 52, 24, 16);
$assocArray = array('a' => 1, 'b' => 2, 'c' => 5, 'd' => 14, 'e' => 19, 'f' => 2, 11, 3, 141, 199, 52, 24, 16);
print_r(extractValues($array, 3));
print_r(extractValues($array, 3, true));
print_r(extractValues($assocArray, 5));
print_r(extractValues($assocArray, 5, true));
?>
Output
Array
(
[0] => 1
[1] => 14
[2] => 11
[3] => 199
[4] => 16
)
Array
(
[0] => 1
[3] => 14
[6] => 11
[9] => 199
[12] => 16
)
Array
(
[0] => 1
[1] => 2
[2] => 52
)
Array
(
[a] => 1
[f] => 2
[4] => 52
)
Use a loop and check the key.
$result = array();
foreach($array as $key => $value) {
if ($key % 3 === 0) {
$result[] = $value;
}
}
Try below one:
<?php
$your_array = array (1,2,5,14,19,2,11,3,141,199,52,24,16);
$every_3 = array();
$i = 0;
foreach($your_value as $value) {
$i++;
if($i%3==0){
$every_3[]=$value;
}
}
var_dump($every_3);
?>
Do like this
$arr=array (1,2,5,14,19,2,11,3,141,199,52,24,16);
$narr=array();
for($i=0;$i<count($arr);$i=$i+3){
$narr[]=$arr[$i]
}
print_r($narr);
<?php
$mynums = array(1,2,5,14,19,2,11,3,141,199,52,24,16);
foreach ($mynums as $key => $value) {
if ( $key % 3 === 0)
{
$newnum[] = $value;
}
}
var_dump($newnum);
?>
$data = array(1,2,5,14,19,2,11,3,141,199,52,24,16);
$matches = array();
foreach($data as $key => $value)
{
if($key%3 === 0)
{
$matches[] = $value;
}
}
var_dump($matches);
The only way you could do it would be to use a loop, count the length of an array, and loop through using a % mathmatical operator.
It gives you a remainder of a division: http://au2.php.net/operators.arithmetic

Intersection of arrays in PHP. Finding matching Pairs

I've got an array like this:
$a = array(
array(2 => 1, 4 => 2, 9 => 3),
array(3 => 7, 4 => 5, 7 => 3),
array(1 => 6, 4 => 5),
...
);
So the array contains a huge amount of sub arrays with integer key => integer value.
Now I want to find subarrays which share no keys or if they share a key the value of this key must be the same.
Example: $a[1] and $a[2] would match because $a[1][4] == $a[2][4] and no other keys match. But $a[0] and $a[1] would not match because $a[0][4] != $a[1][4].
The number of elements in the subarrays may vary.
Is there an efficient way to do this ? The only way I can think of is check each possible pair in a nested loop resulting in O(n^2).
If someone has an idea for a more meaningful title feel free to edit it.
Maybe code makes it more clear: (naive implementation)
$pairs = array();
for($i = 0; $i < count($a); $i++)
for($j = $i+1; $j < count($a); $j++)
if(array_intersect_key($a[$i], $a[$j]) == array_intersect_assoc($a[$i], $a[$j]))
$pairs[] = array($i, $j);
Alternative:
$matching = array();
for($i = 0; $i < count($a); $i++)
for($j = $i+1; $j < count($a); $j++)
if(array_intersect_key($a[$i], $a[$j]) == array_intersect_assoc($a[$i], $a[$j]))
list($matching[$i][], $matching[$j][]) = array($j, $i);
There might be ways to do it, but it somewhat depends on if you know how many matches are likely (or the general 'matchyness' of your data). If there's more matches than not it might be better to start with assuming everything matches and eliminating.
In any case, I think you can pre-process the data. I'm not sure if this is faster -- it really depends on the distribution of your data, but I'd start by trying something like this and work from there:
$a = array(
array(2 => 1, 4 => 2, 9 => 3),
array(3 => 7, 4 => 5, 7 => 3),
array(1 => 6, 4 => 5),
array(1 => 6, 4 => 5, 7 => 5),
array(2 => 1, 4 => 2, 9 => 3)
);
// 1 and 2 match, 2 and 3 match, 0 and 4 match
$keyData = array();
for ($i = 0; $i < count($a); $i++) {
foreach($a[$i] as $k => $v) {
if (!isset($keyData[$k])) {
$keyData[$k] = array();
}
if (!isset($keyData[$k][$v])) {
$keyData[$k][$v] = array();
}
$keyData[$k][$v][] = $i;
}
}
$potentialMatches = array();
foreach ($keyData as $key => $values) {
// Ignore single key/value pairs
if (count($values) > 1) {
foreach ($values as $value => $arrayIndices) {
for ($i = 0; $i < count($arrayIndices); $i ++) {
for ($j = $i + 1; $j < count($arrayIndices); $j ++) {
$potentialMatches[] = array($arrayIndices[$i], $arrayIndices[$j]);
}
}
}
}
}
// You might need to do this ...
/*
foreach ($potentialMatches as &$m) {
array_unique($m);
}
*/
$pairs = array();
foreach ($potentialMatches as $m) {
if(array_intersect_key($a[$m[0]], $a[$m[1]])
== array_intersect_assoc($a[$m[0]], $a[$m[1]])) {
$pairs[] = $m;
}
}
print_r($pairs);
Output:
Array
(
[0] => Array
(
[0] => 0
[1] => 4
)
[1] => Array
(
[0] => 1
[1] => 2
)
[2] => Array
(
[0] => 2
[1] => 3
)
)
EDIT
As I said in my comment, that doesn't catch arrays that don't share any keys -- which you consider a match. The code below does this, although I'm not sure if it's faster than the nested solution (and it's going to use a ton of memory)
// New test data to cover the case I missed
$a = array(
array(2 => 1, 4 => 2, 9 => 3),
array(3 => 7, 4 => 5, 7 => 3),
array(1 => 6, 4 => 5),
array(1 => 6, 4 => 5, 7 => 5),
array(2 => 1, 4 => 2, 9 => 3),
array(8 => 3)
);
// 1 and 2 match, 2 and 3 match, 0 and 4 match, 5 matches all
// First assume everything is a match, build an array of:
// indicies => array of potential matches
$potentialMatches = array_fill(0, count($a), array_keys($a));
// Build data about each key, the indicies that contain that key
// and the indicies for each value of that key
$keyData = array();
for ($i = 0; $i < count($a); $i++) {
foreach($a[$i] as $k => $v) {
if (!isset($keyData[$k])) {
$keyData[$k] = array();
}
if (!isset($keyData[$k][$v])) {
$keyData[$k][$v] = array();
}
$keyData[$k]['all'][] = $i;
$keyData[$k][$v][] = $i;
}
}
// print_r($keyData);
// Now go through the key data and eliminate indicies that
// can't match
foreach ($keyData as $key => $values) {
if (count($values) > 2) { // Ignore single key/value pairs
// Two indecies do not match if they appear in seperate value lists
// First get the list of all indicies that have this key
$all = array_unique($values['all']);
unset($values['all']);
// Now go through the value lists
foreach ($values as $value => $arrayIndices) {
// The indicies for this value cannot match the other
// indices in the system, i.e. this list
$cantMatch = array_diff($all, $arrayIndices);
// So remove the indicies that can't match from the potentials list
foreach ($arrayIndices as $index) {
$potentialMatches[$index] = array_diff($potentialMatches[$index], $cantMatch);
}
}
}
}
//print_r($potentialMatches);
// You said you didn't mind the output format, so that's probably enough
// but that array contains (x,x) which is pointless and both (x,y) and (y,x)
// so we can do one final bit of processing to print it out in a nicer way
$pairs = array();
foreach ($potentialMatches as $x => $matches) {
foreach ($matches as $y) {
if ( ($x < $y) ) {
$pairs[] = array($x, $y);
}
}
}
print_r($pairs);
Output
Array
(
[0] => Array
(
[0] => 0
[1] => 4
)
[1] => Array
(
[0] => 0
[1] => 5
)
[2] => Array
(
[0] => 1
[1] => 2
)
[3] => Array
(
[0] => 1
[1] => 5
)
[4] => Array
(
[0] => 2
[1] => 3
)
[5] => Array
(
[0] => 2
[1] => 5
)
[6] => Array
(
[0] => 3
[1] => 5
)
[7] => Array
(
[0] => 4
[1] => 5
)
)
if you are looking for adjacent matching,
$temp = null;
$last_result = array();
foreach($a as $key => $value){
if(is_null($temp)){
$temp = $value;
} else{
$result = array_intersect_assoc($temp, $value);
if(!empty($result))
array_push($last_result, $result);
$temp = $value;
}
}
print_r($last_result);
otherwise just use array_intersect_assoc
for a example you can do like this
$res = array_intersect_assoc($a[0],$a[1],$a[2]);
print_r($res);

Categories