Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
If we follow the best practice, a function should always return the same type. This will make it easy to translate the problem to languages such as C++ and Java. I would also encourage authors to use type hints in the Solution Setup code.
or if we allow the function to return strings too, then:
On top of what @voile pointed out, electrons are not always filled in the closest (least n) shell first. For example, 4s is filled before filling the 3d. That means first 2 electrons will be filled in n = 4 shell before completely filling the n = 3 shell. There is an (n+l) rule or Aufbau Principle which is used to understand this. And note that Aufbau Principle also has a few exceptions.
https://en.wikipedia.org/wiki/Aufbau_principle
https://byjus.com/chemistry/aufbau-principle/