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 »
Sandbox

Post History

71%
+3 −0
Sandbox Are All Elements Equal?[FINALIZED]

posted 2y ago by Razetime‭  ·  edited 10mo ago by trichoplax‭

#5: Post edited by user avatar trichoplax‭ · 2023-06-19T10:25:52Z (10 months ago)
Add finalized tag now that the sandbox can be filtered to exclude tags
Are All Elements Equal?[FINALIZED]
# Challenge

Given a list of integers >= 0 , check if all of them are equal.

# Tests

```
[1,1,1,1,1] -> true
[0,1,1,6,7] -> false
[1]         -> true  
[]          -> undefined(you do not need to handle this)
```

You may take the integers in any form(strings, list, codepoints, etc.)

You can output two distinct values for true or false, or simply a truthy or falsy value in your language.

Trivial builtins are allowed, but it is encouraged to edit them into the trivial builtins answer, or try a different approach.
#4: Post edited by user avatar Razetime‭ · 2021-08-12T06:39:07Z (over 2 years ago)
  • Are All Elements Equal?
  • Are All Elements Equal?[FINALIZED]
#3: Post edited by user avatar Razetime‭ · 2021-08-05T08:06:40Z (over 2 years ago)
  • # Challenge
  • Given a list of positive integers, check if all of them are equal.
  • # Tests
  • ```
  • [1,1,1,1,1] -> true
  • [0,1,1,6,7] -> false
  • [1] -> true
  • [] -> undefined(you do not need to handle this)
  • ```
  • You may take the integers in any form(strings, list, codepoints, etc.)
  • You can output two distinct values for true or false, or simply a truthy or falsy value in your language.
  • Trivial builtins are allowed, but it is encouraged to edit them into the trivial builtins answer, or try a different approach.
  • # Challenge
  • Given a list of integers >= 0 , check if all of them are equal.
  • # Tests
  • ```
  • [1,1,1,1,1] -> true
  • [0,1,1,6,7] -> false
  • [1] -> true
  • [] -> undefined(you do not need to handle this)
  • ```
  • You may take the integers in any form(strings, list, codepoints, etc.)
  • You can output two distinct values for true or false, or simply a truthy or falsy value in your language.
  • Trivial builtins are allowed, but it is encouraged to edit them into the trivial builtins answer, or try a different approach.
#2: Post edited by user avatar Moshi‭ · 2021-08-05T05:06:28Z (over 2 years ago)
Are All Elements Equal?
# Challenge

Given a list of positive integers, check if all of them are equal.

# Tests

```
[1,1,1,1,1] -> true
[0,1,1,6,7] -> false
[1]         -> true  
[]          -> undefined(you do not need to handle this)
```

You may take the integers in any form(strings, list, codepoints, etc.)

You can output two distinct values for true or false, or simply a truthy or falsy value in your language.

Trivial builtins are allowed, but it is encouraged to edit them into the trivial builtins answer, or try a different approach.
#1: Initial revision by user avatar Razetime‭ · 2021-08-04T17:15:09Z (over 2 years ago)
Are All Elements Equal?
# Challenge

Given a list of positive integers, check if all of them are equal.

# Tests

```
[1,1,1,1,1] -> true
[0,1,1,6,7] -> false
[1]         -> true  
[]          -> undefined(you do not need to handle this)
```

You may take the integers in any form(strings, list, codepoints, etc.)

You can output two distinct values for true or false, or simply a truthy or falsy value in your language.

Trivial builtins are allowed, but it is encouraged to edit them into the trivial builtins answer, or try a different approach.