Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Challenges

Post History

60%
+1 −0
Challenges Are All Elements Equal?

Jelly, 1 byte E Try it online! Boring builtin answer Non builtin, the shortest I can get is 3 bytes: ḷ\⁼ Try it online! Here, we replace each element with the first element, then check i...

posted 3y ago by caird coinheringaahing‭

Answer
#1: Initial revision by user avatar caird coinheringaahing‭ · 2021-08-11T14:56:45Z (over 3 years ago)
# [Jelly], 1 byte

    E

[Try it online!][TIO-ks7lx2by]

[Jelly]: https://github.com/DennisMitchell/jelly
[TIO-ks7lx2by]: https://tio.run/##y0rNyan8/9/1/@F2zf//ow11oDBWRyHaAMw00zEHcQxjAQ "Jelly – Try It Online"

Boring builtin answer

Non builtin, the shortest I can get is 3 bytes:

    ḷ\⁼

[Try it online!][TIO-ks7m275r]

[Jelly]: https://github.com/DennisMitchell/jelly
[TIO-ks7m275r]: https://tio.run/##y0rNyan8///hju0xjxr3/D/crvn/f7ShDhTG6ihEG4CZZjrmII5hLAA "Jelly – Try It Online"

Here, we replace each element with the first element, then check if that is equal to the original array