implement a bit array demo method to get k maximum element