Category: c / c++
Given a 32-bit integer (signed or unsigned), convert it to its hexadecimal in lowercase. The result should not have leading zero unless it is equal to zero. Please do …
The LineSpace Algorithm generates linearly spaced vector. You are asked to write a C++ function that has the following syntax: vector<double> linespace(double start, double ed, int num); For example, …
Recently, the PPAP song becomes hot in internet. Here is the original version and the cover: C++ version of PPAP Really, this C++ code is just for beginner. The …
Any positive integers will become 1 following the steps: (1) divide by 2 if it is even (2) otherwise increment or decrement by 1. So the question is: could …
This is another classic interview question: You are asked to write a function (in C/C++) that determines the number of bits required to convert one integer to another. The …