Guitar pitch detection
Your question is ambiguous.  Chord, pitch and frequency detection/estimation are very different things.  Bare FFT magnitudes are really bad at guitar pitch modeling.  YIN is a better monophonic pitch estimator.  Polyphonic chord estimation is vastly more difficult, and may or may not even be possible, depending on your input data or time/pitch accuracy requirements (exactly what is your "exact result"?) plus any computational limitations ("real time" latency requirements, CPU performance/cores/GPUs available, etc.)