Added two algorithm in C