C Programming – Ugly Numbers – Dynamic Programming Ugly numbers are numbers whose only prime factors are 2, 3 or 5. Every step we choose the smallest one
C Programming -Time complexity of append is O(n) where n is number of nodes in linked list. Since there is a loop from head to end, the function does O(n)
C Programming – Vertex Cover Problem – Introduction and Approximate Algorithm – It can be proved that the above approximate algorithm never finds a vertex