Category: c / c++
Given a list of integers nums, put all the zeros to the back of the list by modifying the list in-place. The relative ordering of other elements should stay …
Run-length encoding is a fast and simple method of encoding strings. The basic idea is to represent repeated successive characters as a single count and character. For example, the …
Given two strings a, and b, both representing an integer, add them and return it in the same string representation. Bonus: can you implement the addition directly, instead of …
Implement a String Copy function in C – which is commonly asked during the coding interview for embeded programming jobs. In C, we use char * to represent the …
You are given a string s and an integer k. Return the number of palindromes you can construct of length k using only letters in s. Letters can be …