SOURCE
Continue ReadingC++: Monty Hall Problem
Run random simulations of the Monty Hall game. Show the effects of a strategy of the contestant always keeping his first guess so it can be contrasted
Continue ReadingC++: ABC Problem
You are given a collection of ABC blocks. Just like the ones you had when you were a kid. There are twenty blocks with two letters on each block. You
Continue ReadingC++: Dutch National Flag Problem
The Dutch national flag is composed of three coloured bands in the order red then white and lastly blue. The problem posed by Edsger Dijkstra is:
Continue ReadingC++: Josephus Problem
Josephus problem is a math puzzle with a grim description: n prisoners are standing on a circle, sequentially numbered from 0 to n − 1. An execut
Continue ReadingC++: 100 Doors Problem
Problem: You have 100 doors in a row that are all initially closed. You make 100 passes by the doors. The first time through, you visit every door and
Continue ReadingC++: Closest-Pair Problem
The aim of this task is to provide a function to find the closest two points among a set of given points in two dimensions, i.e. to solve the Closest
Continue ReadingC++: Dining Philosophers
The dining philosophers problem illustrates non-composability of low-level synchronization primitives like semaphores. It is a modification of a probl
Continue ReadingC++: Knapsack Problem
A tourist wants to make a good trip at the weekend with his friends. They will go to the mountains to see the wonders of nature, so he needs to pack w
Continue ReadingWhy Is Tax Dodging a Problem?
SOURCE
Continue Reading