Number following a pattern | 🧑‍💻 C++, Java, Python | S.C ➡️ O(1) | Strings | POTD | Geeksforgeeks