Post History
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!
Answer
#3: Post edited
# 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
# 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
# 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"