Your task is to find all the elements of an array that are non consecutive. A number is considered non consecutive if it is not exactly one larger ...
For further actions, you may consider blocking this person and/or reporting abuse
Here's mine
Bravo! You did what I could not 😂
You could. You just need to go on step forward
Here is the simple solution with Python:
Rust:
huhuhu iterator
TypeScript
Haskell solution:
Test results:
Ruby
for clarification, from the challenge:
Python solution 🐍
solution in Nim:
A python solution:
BTW: the example is wrong.
{'i': 7, 'n': 15}
should be{'i': 7, 'n': 10}
- there is no15
in the input.JavaScript solution in 5 lines
You could do it in one :)
SWI Prolog again
Ruby