Problem of the Week

From Computer Science
Revision as of 01:22, 21 May 2020 by Jkinne (talk | contribs) (Created page with "This page lists the "problems of the week" - extra programming problems meant to help people practice their programming skills. =About= These will be at a variety of differ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page lists the "problems of the week" - extra programming problems meant to help people practice their programming skills.

About

These will be at a variety of different levels. Some support is provided in the CS Online Lab team in Microsoft Teams. You can go to the team, go to the Problem of the Week channel, and fire away your questions.

Note that many of these problems can be solved in any programming language. The CS Online Lab will support assistance in Python, C, C++, and R. Some problems may be easier to implement in some languages than others.

Problems are listed in "reverse chronological order" within each section/subsection (new problems are added to the top of the section). A date of posting is listed for each problem.

Note that some "classic" programming problems are listed. You should work to solve these on your own, not by simply looking up the solutions online. You learn and improve your skills by making the solutions yourself.

Basic Programming

Numbers

factor 5/20/2020 - read an integer from standard input (keyboard), output its prime factorization.

primes 5/20/2020 - read an integer from standard input, output all prime numbers <= that number.

stats 5/20/2020 - read an integer n and then n integers from standard input, output the min, max, mean.

Data Structures and Algorithms

Sorting

sorts 5/20/2020 - first command-line argument is either bubble, insertion, selection. Read from standard input until EOF, output the number of steps to sort the numbers. If second command-line argument is "verbose", also print the numbers in sorted order.

Trees

binaryTree 5/20/2020 - read integers from standard input until EOF, output the number of steps to build a binary tree out of the numbers. If second command-line argument is "verbose", also print the tree.

Lists

rpn 5/20/2020 - evaluate the command line arguments as an RPN expression. Note that you will need to keep a stack (linked list) of the values (since this is how RPN is evaluated).

Data Science