Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions solution/1700-1799/1732.Find the Highest Altitude/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,25 @@ int largestAltitude(int *gain, int gainSize) {
}
```

### **PHP**

```php
class Solution {
/**
* @param Integer[] $gain
* @return Integer
*/
function largestAltitude($gain) {
$max = 0;
for ($i = 0; $i < count($gain); $i++) {
$tmp += $gain[$i];
if ($tmp > $max) $max = $tmp;
}
return $max;
}
}
```

### **...**

```
Expand Down
19 changes: 19 additions & 0 deletions solution/1700-1799/1732.Find the Highest Altitude/README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,25 @@ int largestAltitude(int *gain, int gainSize) {
}
```

### **PHP**

```php
class Solution {
/**
* @param Integer[] $gain
* @return Integer
*/
function largestAltitude($gain) {
$max = 0;
for ($i = 0; $i < count($gain); $i++) {
$tmp += $gain[$i];
if ($tmp > $max) $max = $tmp;
}
return $max;
}
}
```

### **...**

```
Expand Down
14 changes: 14 additions & 0 deletions solution/1700-1799/1732.Find the Highest Altitude/Solution.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
class Solution {
/**
* @param Integer[] $gain
* @return Integer
*/
function largestAltitude($gain) {
$max = 0;
for ($i = 0; $i < count($gain); $i++) {
$tmp += $gain[$i];
if ($tmp > $max) $max = $tmp;
}
return $max;
}
}