Tag: algorithm
The problem is from Timus Online Judge It is a simple and easy exercise, you should output correct word depending on the input integer. No much thing to mess …
Almost every online judge has a “A+B” problem. The first problem (easiest) is often present to allow testing if online judges are working (of course they are!) This problem …
Remember a couple days ago, we discussed the O(n) and O(n^2) solutions to Single Number ? Question: Given an array of integers, every element appears three times except for one. Find …
A Stack is a data structure that satisfies Last-In-First-Out. It can be considered as a pile of plates where you always take the top plate (you put on last). …
Question: Given an integer (maximum 100), compute the number of distinct ways to split the number using non-negative integer numbers. For example, given 5, there are 7 ways to …