Back to Browse

Leetcode 3740. & 3741. Minimum Distance Between Three Equal Elements I & II | O(N^2) | O(NLogN)

291 views
Nov 9, 2025
31:02

Hi, in this video, I have explained Leetcode problems 3740 & 3741. Minimum Distance Between Three Equal Elements I && II. 1. Explained the problem statement with examples. 2. Shared the approach of time complexity O(N^2). 3. Shared optimal approach by using sort. Time complexity for this approach O(NlogN). 4. Shared C++ code. Problem Links:- 1. https://leetcode.com/problems/minimum-distance-between-three-equal-elements-i/ 2. https://leetcode.com/problems/minimum-distance-between-three-equal-elements-ii/ Code Links:- 1. https://leetcode.com/problems/minimum-distance-between-three-equal-elements-i/submissions/1824620827/ 2. https://leetcode.com/problems/minimum-distance-between-three-equal-elements-ii/submissions/1824627354/

Download

0 formats

No download links available.

Leetcode 3740. & 3741. Minimum Distance Between Three Equal Elements I & II | O(N^2) | O(NLogN) | NatokHD