Replace the previous O(N^2) implementation of remove_duplicates() with a O(N) version using a fast/slow pointer approach. The new version keeps only the first occurrence of each element and compacts the array in place, improving efficiency without changing functionality. Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com> Reviewed-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> |
||
|---|---|---|
| .. | ||
| dml21 | ||
| Makefile | ||
| cmntypes.h | ||
| display_mode_core.c | ||
| display_mode_core.h | ||
| display_mode_core_structs.h | ||
| display_mode_lib_defines.h | ||
| display_mode_util.c | ||
| display_mode_util.h | ||
| dml2_dc_resource_mgmt.c | ||
| dml2_dc_resource_mgmt.h | ||
| dml2_dc_types.h | ||
| dml2_internal_types.h | ||
| dml2_mall_phantom.c | ||
| dml2_mall_phantom.h | ||
| dml2_policy.c | ||
| dml2_policy.h | ||
| dml2_translation_helper.c | ||
| dml2_translation_helper.h | ||
| dml2_utils.c | ||
| dml2_utils.h | ||
| dml2_wrapper.c | ||
| dml2_wrapper.h | ||
| dml_assert.h | ||
| dml_depedencies.h | ||
| dml_display_rq_dlg_calc.c | ||
| dml_display_rq_dlg_calc.h | ||
| dml_logging.h | ||