Mark the tick against the correct answer in the following: The principal value of \cos ^{-1}\left(\frac{-1}{2}\right) is
A. \frac{-\pi}{3}
B. \frac{2 \pi}{3}
C. \frac{4 \pi}{3}
D. \frac{\pi}{3}