DSA

Below you will find pages that utilize the term “DSA”
February 17, 2024
Find K Closest Elements - LeetCode : Swift

Find K Closest Elements - LeetCode Given a sorted integer array arr, two integers k and x, return the k closest integers to x in the array. …

February 15, 2024
Intersection of Two Arrays - LeetCode : Swift

Intersection of Two Arrays - LeetCode Given two integer arrays nums1 and nums2, return an array of their intersection. Each element in the result must be unique and you may return the result in any order. …

February 9, 2024
Contains Duplicate II - LeetCode : Swift

Contains Duplicate II - LeetCode Given an integer array nums and an integer k, return true if there are two distinct indices i and j in the array such that nums[i] == nums[j] and abs(i - j) <= k. …

February 9, 2024
Minimum Size Subarray Sum - LeetCode : Swift

Minimum Size Subarray Sum - LeetCode Given an array of positive integers nums and a positive integer target, return the minimal length of a subarray whose sum is greater than or equal to target. …

February 9, 2024
Repeated DNA Sequences - LeetCode : Swift

Repeated DNA Sequences - LeetCode The DNA sequence is composed of a series of nucleotides abbreviated as 'A', 'C', 'G', and 'T'. …

February 3, 2024
Longest Substring Without Repeating Characters - LeetCode : Swift

Longest Substring Without Repeating Characters - LeetCode Given a string s, find the length of the longest substring without repeating characters. …

January 31, 2024
Majority Element - LeetCode : Swift

Majority Element - LeetCode Given an array nums of size n, return the majority element. The majority element is the element that appears more than [n / 2] times. …

January 25, 2024
Longest Substring with At Least K Repeating Characters - LeetCode : Swift

Longest Substring with At Least K Repeating Characters - LeetCode Given a string s and an integer k, return the length of the longest substring of s such that the frequency of each character in this substring is greater than or equal to k. …