mk base for 3 sum and k sum