Category: c / c++
You’ve devised a simple encryption method for alphabetic strings that shuffles the characters in such a way that the resulting string is hard to quickly read, but is easy …
Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the value …
Slow Sums Algorithms Suppose we have a list of N numbers, and repeat the following operation until we’re left with only a single number: Choose any two numbers and …
The File system keeps a log each time some user performs a change folder operation. The operations are described below: “../” : Move to the parent folder of the …
Given a matrix with dimension NxN, rotate the matrix in place the 90 degrees clockwise and anti-clockwise. For example, original Matrix 3×3: vector<vector<int>> matrix({ {1, 2, 3}, {4, 5, …