Category: c / c++
Write a method to check if a given integer is a perfect square e.g. 4, 9, 16, 25 … you cannot use the sqrt or pow functions. One solution …
Given n items with size A (i from 0 to n – 1), an integer m denotes the size of a backpack. How full you can fill this backpack? …
Given an array of integers, the majority number is the number that occurs more than half of the size of the array. Find it in O(n) time and O(1) …
A point is chosen randomly in a square. 4 lines are drawn to connect this point with the 4 vertices of this square, such that 4 triangles are formed. …
The Bitcoin hard-forked this Month (1 Aug 2017), which is the biggest great news in the bitcoin world. The fork is the operation for process to duplicate the code …