Add algorithm: check if a char[] can build certain word