Category: c / c++
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 …
Given two 32-bit integers N and M, write a function to replace N (between bits position i and j) with M, so M becomes a substring of N located …