implement using c & c++