Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Non-Decreasing Subsequence
audipower
Jun 3rd, 2019
153
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
JavaScript
0.22 KB
| None
|
0
0
raw
download
clone
embed
print
report
function
solve
(
arr
)
{
let result
=
[
]
;
let max
=
-
Infinity
;
arr.
filter
(
e
=>
{
if
(
e
>=
max
)
{
result.
push
(
e
)
;
max
=
e
;
}
}
)
console.
log
(
result.
join
(
" "
)
)
;
}
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
This month smells like money
CSS | 7 min ago | 0.15 KB
✅ Admin Password
CSS | 16 min ago | 0.15 KB
dev loader method
CSS | 26 min ago | 0.15 KB
Exploit
CSS | 35 min ago | 0.15 KB
Free money using older build
CSS | 44 min ago | 0.15 KB
✅ Changelly.com Exploit
CSS | 53 min ago | 0.15 KB
Untitled
5 hours ago | 71.83 KB
Untitled
6 hours ago | 0.52 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!