An electrocardiogram (ECG) is a non-invasive examination that records the electrical activity of the heart. It helps detect: