TG Telegram Group Link
Channel: Programming Challenges
Back to Bottom
FACTORY
+=======+
Calculate the factorial of a given number.
You can either implement it recursively or iteratively!
+==========+
Please answer to this message with your solution :)
Got a challenge Idea? DM it to @BinaryByter for a chance to be featured on this channel!
TALENTRATOR's NEW LOOK. Which one do you prefer?
Left or right?
Anonymous Poll
55%
Left
45%
Right
CODES
+======+

Each person in Italy has an unique identifying ID code issued by the national tax office after the birth registration: the Fiscal Code (Codice Fiscale). Check the Resources tab for more info on this.

Given an object containing the personal data of a person (name, surname, gender and date of birth) return the 11 code characters as a string following these steps:

Generate 3 capital letters from the surname, if it has:
At least 3 consonants then the first three consonants are used. (Newman -> NWM).
Less than 3 consonants then vowels will replace missing characters in the same order they appear (Fox -> FXO | Hope -> HPO).
Less than three letters then "X" will take the third slot after the consonant and the vowel (Yu -> YUX).

Generate 3 capital letters from the name, if it has:
Exactly 3 consonants then consonants are used in the order they appear (Matt -> MTT).
More than 3 consonants then first, third and fourth consonant are used (Samantha -> SNT | Thomas -> TMS).
Less than 3 consonants then vowels will replace missing characters in the same order they appear (Bob -> BBO | Paula -> PLA).
Less than three letters then "X" will take the the third slot after the consonant and the vowel (Al -> LAX).

Generate 2 numbers, 1 letter and 2 numbers from date of birth and gender:
Take the last two digits of the year of birth (1985 -> 85).
Generate a letter corresponding to the month of birth (January -> A | December -> T) using the table for conversion included in the code.
For males take the day of birth adding one zero at the start if is less than 10 (any 9th day -> 09 | any 20th day -> 20).
For females take the day of birth and sum 40 to it (any 9th day -> 49 | any 20th day -> 60).

EXAMPLE:

fiscalCode({
name: "Helen",
surname: "Yu",
gender: "F",
dob: "1/12/1950"
}) ➞ "YUXHLN50T41"

fiscalCode({
name: "Mickey",
surname: "Mouse",
gender: "M",
dob: "16/1/1928"
}) ➞ "MSOMKY28A16"
Ayyyyyy
Anonymous Poll
58%
Ayyyyyy
42%
Yooooo
C programming course session

On of our most experienced channel members (@QNeko) will be giving a comprehensive course on C programming for beginners. The course will teach you the basics of programming in C. It serves as a foundation to then learn system programming and embedded programming in C.

The course costs $32.5 per month over 3 months (one day per week, 13 days total) or $97.5 in total. It covers the following:

Basics
* Functions
* Types
* Expressions
* Pointers
* Control-flow
* Macros

Styles
* Procedural programming
* OOP

Compilers and friends
* Unix
* Make
* GCC and options
* Linker and options

Courses will be on Saturdays, 7:00AM UTC to 11:00AM UTC and 12:30PM UTC to 03:30PM UTC, starting on May 21rst 2022.

https://cloud.nekoit.xyz/apps/forms/YBt5F4gz4RS5Qmbx
Forwarded from Ayoob Saad AbdulWahid /A
Fix our phones
____
Many of us plug our phones in before going to bed to let it charge while we're asleep, and we all know how smart our phones are, because they know when the phone is fully charged to stop providing it with power.
Except that there's an issue: the phone is running a lot of tasks in the background and that will cause the phone to lose some of its energy, therefore, the charger will sense that and start charging again, and that can happen many times and can damage our phones.
Your task is:
Write a function that takes the percentage of charge as an input and ask the user if they want to charge in "sleep mode". The sleep mode stops providing the phone with power when it gets to 100% and doesn't start charging again unless it's less 95%, if it gets less 95% then it starts charging until 100%, and keeps repeating the process.
Programming Challenges
Chess Tournament? 😏
Chess-Tournament
+==============+
Well... Looks like I don't have a choice 😉

The tournament will start 8:00PM UTC-2, today.

Join here: https://lichess.org/tournament/hjJRxA3I

Can't wait to figure out who the winner is 😏
Hi dev colleagues!
I’d love to hear your feedback on my latest project. This should helps us developers to better focus through blocking digital distractions! It already helped me to reduce multitasking in stressful times. It works like this:
https://youtu.be/58qNJcx4NrQ

What do you think? You can send me your feedback in DM.
Message from a friend of mine (in reality, my menthor!) who is an instructor for programmers:

"Hello, I am opening a free workshop on problem solving for programmers aimed at beginners to intermediate developers in terms of skill.

The workshop parallel goal is to test a new textbook which will be provided under a non-disclosure agreement. Only residents of the European Union or citizens of a country from the European Union or Switzerland can apply for that reason.

The workshop will be held on Saturday September 3rd 2022 from 14:00 CET to 18:00 CET. You can apply via the link below, I will however only approve of up to 5 applicants. Thank you in advance!

https://cloud.nekoit.xyz/apps/forms/oceZ27KdNE8CsrJK"
Talentrator.com is thinking of changing its name to Hashlist.com. What do you think of the name?
Anonymous Poll
24%
amazing name
27%
good name
27%
okay name
9%
bad name
12%
horrible name
COUNTING SORT
+========+
Time: 30 minutes - 1 hour
Difficulty: Medium
Languages: Any
+========+
Implement a counting sort function that takes in a list of integers and returns a sorted list in ascending order. Your solution should not use any inbuilt sorting functions.
+========+
Please answer to this message with your solution 🙂
ROTATING ARRAY
+========+
Time: 30 minutes - 1 hour
Difficulty: Easy
Languages: Any
+========+
Given an array and a number k, implement a function that rotates the array to the right by k positions. Your solution should not use any inbuilt array rotation functions.
+========+
Please answer to this message with your solution :)
LONGEST COMMON PREFIX
+========+
Time: 30 minutes - 1 hour
Difficulty: Medium
Languages: Any
+========+
Given a list of strings, implement a function that finds the longest common prefix among all the strings. Your solution should have a linear time complexity.
+========+
Please answer to this message with your solution :)
FINDING PAIRS
+========+
Time: 30 minutes - 1 hour
Difficulty: Medium
Languages: Any
+========+
Given a list of integers and a target number, implement a function that finds all pairs of integers in the list that add up to the target number.
+========+
Please answer to this message with your solution :)
CHECK PRIME NUMBER
+========+
Time: 15 minutes
Difficulty: Easy
Languages: Any
+========+
Implement a function that takes in a positive integer and returns a boolean indicating whether or not the number is prime.
+========+
Please answer to this message with your solution :)
HTML Embed Code:
2025/07/03 09:35:22
Back to Top