added the algo not the code..code is easy