It has been a year since I graduated from college, and wow! How time flew by. A good friend of mine, James (you can check out his portfolio here), was interested in sharpening his coding skills, so I compiled a list of all my coding projects I did throughout my time in college. After a day or two, I decided why not share it with the world. Other people may find these coding challenges useful. These problems range from easy to hard and are broken down by the languages I have used. Feel free to use whatever language you please. You will also see some of the same coding challenges for different languages, and some hardware may be required. Without further ado, here are 74 different coding challenges.
This list contains affiliate links where I may earn a small commission on your purchases.
Mind Bogging Coding Challenges in Assembly (x86)
- Counting characters in a user-entered string
- Enter a name and a grade then print them out [gradebook]
- Read in user input then replace escaped characters with the ASCII equivalent characters
- Add functionality to the gradebook to accept a list of names and grades then display the list with different colors on the grades
- Read in information from a user that would create and return a postage stamp label
- Create the toUpper() function from scratch
- Create a book catalog that can sort, compare, then print them (this project worked with and communicated to C)
Coding Challenges in C
- Calculate the next 2 numbers in a given series
- Convert back and forth between Celsius and Fahrenheit
- User entered grade percentage then return a letter grade
- User input (in degrees) to see if it lies within one of the 4 quadrants of the Cartesian plane
- Calculate the area and perimeter of a triangle given the base and height
- Simple guess the random number game
- Read in a list of user-entered numbers then return the sum, max, min, and average of the list
- Read in a user-entered number then return the number in reverse (501 – 105)
- Read in test scores but only print out the grades above 90 to a file
- Read in a floating point number representing change ($0.20) then break down the change in dollars, quarters, dimes, nickles, and pennies (return 2 dimes)
- Check if a string is a palindrome
- Same as the change problem but read in dollar amounts then breaking down the dollars to 100, 50, 20, 10, 5, and 1 ($105 – 1 $100 1 $5)
- Compare user-entered fractions
- Bubble sort algorithm
- Selection sort algorithm
- Insertion sort algorithm
- Battleship game with functionality for player vs player, player vs computer, and computer vs computer
- The same book catalog with some functions in C and calls to Assembly (see the assembly projects)
- Bash shell from scratch
- Create a new filesystem driver called FAT65 extending off the Linux FAT32 filesystem
Brainteasing Coding Challenges in C++
- Simply add 2 numbers from a user
- Order of operation problems (PEMDAS)
- Compute the factorial of a user-entered number
- Create dog objects with different names, ages, owners, and overall happiness that increases or decreases on different actions
- Create fraction objects that compute the reciprocal of the fraction
- Linked list
- Create different objects that demonstrate inheritance with houses, apartments, and tents objects
- Polymorph different shapes objects where each class does a different thing
- Read in a graph from a file then walk the graph given a starting vertex, the number of steps, and seed the random number generator for steps. Make it a game
- Stacks, queues, and lists
- Sliding puzzle game to order a 3 x 3 grid of numbers to 1 – 8
- Trie Tree used for tic-tac-toe games
- B-tree algorithm to store music data where you can sort them
- Hash table algorithm
Coding Problems in JavaScript
- Create a shoutbox mock website
- Create the whack-a-mole game
- Create a map that would display points of interest along with the information on the point in a given radius (leaflet.js for maps and the Wiki API for the information)
Example Problems for PHP
- Create a mock Dropbox website
- Create a calendar where you can add and delete events
R Puzzles.
- Read a directory where a list of text files reside to find the longest word, word count, top 10 words, number of duplicated words. Do for each file and a directory as a whole
- Plot data on different graphs
- Find the difference of something between two files. I used the difference in bachelor’s degree from different years from a given school.
Bash Problems
- Find duplicate files in a directory
- Create an address book
- Find large and old files and give the option to remove them to the trash
Perl (Regex expressions) Challenges
- Test HTML tags to see if they are correctly formatted or not (h1/h1 = pass, h1/h2 = fail)
- Identify formats in one or more units of time
- Match lines from the output of a git log that show files that only have been added or deleted, not both operations (git shows ‘+’s and ‘-‘s)
- Process a tab-separated (TSV) data file with data of your choice that meets a certain condition (movie data that only shows movies from 2018 and have a 5-star rating)
- Convert markdown link tags to HTML link tags
- Convert markdown bold and italic tags to HTML tags
- Sanitize credit card numbers to 4 dots followed by the last 4 digits and test whether the credit card is valid or not. (6011012345678901 – ….8901)
- Convert CSV file to JSON format
Python Brainteasers
- Breadth-first search
- Depth-first search
- Uniform cost search (Dijkstra’s algorithm)
- Min-Max tree for an artificial intelligence to play Connect 4
- A maze navigating robot (this requires a Raspberry Pi with a robot kit)
Visual Basic Coding Problems
- Grade Calculator
- Triangle Calculator
- Functional notepad application where you can modify text (fonts, saving to a file, etc.)
Note: The problems above in the Visual Basic section, the first two can be done both in the console and in a graphical user interface. As for the data, an excellent website for data files is kaggle.com.
Looking for more tech related content? Jstroup.dev has you covered!