Updated leftRotate() and added its test codes