Hilbert–Samuel And Hilbert–Kunz Functions Of Zero-Dimensional Ideals