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

50%
+0 −0
Challenges Mediocre pop count

JavaScript, 104 102 99 bytes I/O as a character array. a=>a.filter(x=>a<g(x)&g(x)<a[~-a.length],a=a.map(g=x=>[...Buffer(x)[0].toString(2)].sort()).sort()) Try it online!

posted 2y ago by Shaggy‭  ·  edited 2y ago by Shaggy‭

Answer
#3: Post edited by user avatar Shaggy‭ · 2022-12-19T10:34:48Z (about 2 years ago)
  • # JavaScript, <s>104</s> 102 bytes
  • I/O as a character array.
  • <!-- language-all: lang-javascript -->
  • a=>a.filter(x=>a[0]<g(x)&g(x)<a[~-a.length],a=a.map(g=x=>[...Buffer(x)[0].toString(2)].sort()).sort())
  • [Try it online!](https://tio.run/##NcsxC4MwFATg/@JQEqiP0tkUGhxcCgVHCfiwSaqkeZKk1al/PdWhy90N9034wTiEcU6lp4fORmQUFwQzuqQDW7fdnVRl2coPe1TYfUsEp71NT3VEgfDCmVmxPTsAkG9jdsc3BYnaFEZv2ZkriBQS4/zfeSAfyWlwZJlhuy3oel9a0s1AddDpJiXpSDKibWrSS6E4TDT6vuf5Bw)
  • # JavaScript, <s>104</s> <s>102</s> 99 bytes
  • I/O as a character array.
  • <!-- language-all: lang-javascript -->
  • a=>a.filter(x=>a<g(x)&g(x)<a[~-a.length],a=a.map(g=x=>[...Buffer(x)[0].toString(2)].sort()).sort())
  • [Try it online!](https://tio.run/##XZFLa8MwEITv/hVBhyKRWCnNsXEhTtKGQh/gozF4K0uKg@sNktq4l/71VK77sH2R5tPMIpg9wDtYYcqjC2ss5FlFZ4hugKuyctLQxuulpg27aI8lpJ8h8ErW2u2zGUTAX@FIdeRjKec8flOqHWLpZcYdJs6UtaZXLOMWjaOM/d7@jzQgZDafTwgJCPyrl54UfV0MQA5JjVB3LLwRkNWfuYp7ct3XmwFsh3Q7wruO194ICK6eTwnKncCNke4hjlFajC3o3QblqUsmUrSetP5Z@pkh9xPeza59@2i2IPZt/QJri5XkFWp6nzw9cvvdaqk@fM/TfBJNcn6EInHgm10swuZnPWw6SivarqjJGD9gWec582v4Ag)
#2: Post edited by user avatar Shaggy‭ · 2022-10-10T15:18:28Z (about 2 years ago)
  • # JavaScript, 104 bytes
  • I/O as a character array.
  • <!-- language-all: lang-javascript -->
  • a=>a.filter(x=>a[0]<g(x)&g(x)<a[~-a.length],a=a.map(g=x=>[...x.charCodeAt().toString(2)].sort()).sort())
  • [Try it online!][TIO-l92ut0k2]
  • [JavaScript (Node.js)]: https://nodejs.org
  • [TIO-l92ut0k2]: https://tio.run/##NYwxC4MwFIT/i0NJoD5KZ1PQOrgUCo4i@EhjjKR5koTq1L9u49Dl7vi4uxk/GKQ3S8wdvdQ@ih3FDWE0NirPtpS7S19otvHTIQV23xzBKqfj1J9RILxxYVqkZgcAG8gJ/T1dlZFxiNRGb5xmV95DIJ8Y//suyQWyCixpNrJjnVH5XFtSjaTaq/ioKlKBqoC6qUmtWc9hJuOGge8/ "JavaScript (Node.js) – Try It Online"
  • # JavaScript, <s>104</s> 102 bytes
  • I/O as a character array.
  • <!-- language-all: lang-javascript -->
  • a=>a.filter(x=>a[0]<g(x)&g(x)<a[~-a.length],a=a.map(g=x=>[...Buffer(x)[0].toString(2)].sort()).sort())
  • [Try it online!](https://tio.run/##NcsxC4MwFATg/@JQEqiP0tkUGhxcCgVHCfiwSaqkeZKk1al/PdWhy90N9034wTiEcU6lp4fORmQUFwQzuqQDW7fdnVRl2coPe1TYfUsEp71NT3VEgfDCmVmxPTsAkG9jdsc3BYnaFEZv2ZkriBQS4/zfeSAfyWlwZJlhuy3oel9a0s1AddDpJiXpSDKibWrSS6E4TDT6vuf5Bw)
#1: Initial revision by user avatar Shaggy‭ · 2022-10-10T14:19:40Z (about 2 years ago)
# JavaScript, 104 bytes

I/O as a character array.

<!-- language-all: lang-javascript -->

    a=>a.filter(x=>a[0]<g(x)&g(x)<a[~-a.length],a=a.map(g=x=>[...x.charCodeAt().toString(2)].sort()).sort())

[Try it online!][TIO-l92ut0k2]

[JavaScript (Node.js)]: https://nodejs.org
[TIO-l92ut0k2]: https://tio.run/##NYwxC4MwFIT/i0NJoD5KZ1PQOrgUCo4i@EhjjKR5koTq1L9u49Dl7vi4uxk/GKQ3S8wdvdQ@ih3FDWE0NirPtpS7S19otvHTIQV23xzBKqfj1J9RILxxYVqkZgcAG8gJ/T1dlZFxiNRGb5xmV95DIJ8Y//suyQWyCixpNrJjnVH5XFtSjaTaq/ioKlKBqoC6qUmtWc9hJuOGge8/ "JavaScript (Node.js) – Try It Online"