Linux cesa-www-main 6.1.0-49-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
Apache/2.4.68 (Debian)
Server IP : 10.218.0.2 & Your IP : 216.73.216.28
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
cesa.co.za /
vendor /
sebastian /
diff /
src /
Delete
Unzip
Name
Size
Permission
Date
Action
Exception
[ DIR ]
drwxr-sr-x
2024-03-02 07:15
Output
[ DIR ]
drwxr-sr-x
2024-03-02 07:15
Chunk.php
2.43
KB
-rw-r--r--
2024-03-02 07:15
Diff.php
2.08
KB
-rw-r--r--
2024-03-02 07:15
Differ.php
6.58
KB
-rw-r--r--
2024-03-02 07:15
Line.php
1.27
KB
-rw-r--r--
2024-03-02 07:15
LongestCommonSubsequenceCalculator.php
486
B
-rw-r--r--
2024-03-02 07:15
MemoryEfficientLongestCommonSubsequenceCalculator.php
2.61
KB
-rw-r--r--
2024-03-02 07:15
Parser.php
3.11
KB
-rw-r--r--
2024-03-02 07:15
TimeEfficientLongestCommonSubsequenceCalculator.php
2.31
KB
-rw-r--r--
2024-03-02 07:15
Save
Rename
<?php declare(strict_types=1); /* * This file is part of sebastian/diff. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\Diff; use function array_reverse; use function count; use function max; use SplFixedArray; final class TimeEfficientLongestCommonSubsequenceCalculator implements LongestCommonSubsequenceCalculator { /** * @inheritDoc */ public function calculate(array $from, array $to): array { $common = []; $fromLength = count($from); $toLength = count($to); $width = $fromLength + 1; $matrix = new SplFixedArray($width * ($toLength + 1)); for ($i = 0; $i <= $fromLength; $i++) { $matrix[$i] = 0; } for ($j = 0; $j <= $toLength; $j++) { $matrix[$j * $width] = 0; } for ($i = 1; $i <= $fromLength; $i++) { for ($j = 1; $j <= $toLength; $j++) { $o = ($j * $width) + $i; // don't use max() to avoid function call overhead $firstOrLast = $from[$i - 1] === $to[$j - 1] ? $matrix[$o - $width - 1] + 1 : 0; if ($matrix[$o - 1] > $matrix[$o - $width]) { if ($firstOrLast > $matrix[$o - 1]) { $matrix[$o] = $firstOrLast; } else { $matrix[$o] = $matrix[$o - 1]; } } else { if ($firstOrLast > $matrix[$o - $width]) { $matrix[$o] = $firstOrLast; } else { $matrix[$o] = $matrix[$o - $width]; } } } } $i = $fromLength; $j = $toLength; while ($i > 0 && $j > 0) { if ($from[$i - 1] === $to[$j - 1]) { $common[] = $from[$i - 1]; $i--; $j--; } else { $o = ($j * $width) + $i; if ($matrix[$o - $width] > $matrix[$o - 1]) { $j--; } else { $i--; } } } return array_reverse($common); } }