Programming-Basics

Below you will find pages that utilize the term “Programming-Basics”
September 4, 2023
Merge Sorted Array - LeetCode : Swift

Merge Sorted Array - LeetCode You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of elements in nums1 and nums2 respectively. …

September 3, 2023
Next Greater Element I - LeetCode : Swift

Next Greater Element I - LeetCode The next greater element of some element x in an array is the first greater element that is to the right of x in the same array. …

September 2, 2023
Longest Common Prefix - LeetCode : Swift

Longest Common Prefix - LeetCode Write a function to find the longest common prefix string amongst an array of strings. …

September 1, 2023
Two Sum - LeetCode : Swift

Two Sum - LeetCode Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. …

July 18, 2023
Bubble Sort : Swift

Bubble sort is a simple and straightforward sorting algorithm commonly used in computer science. In Swift language, Bubble sort works by repeatedly swapping adjacent elements if they are in the wrong order until the entire list is sorted. …

July 13, 2023
Linked List Implementation: Swift

A linked list is a data structure in Swift that consists of nodes linked together via pointers or references. Each node contains data and a reference to the next node. …

July 11, 2023
Remove duplicates from array: Swift

To remove duplicates from an array in Swift using a dictionary, we can create an empty dictionary and iterate through the array. …

July 8, 2023
Binary Serach : Swift

Binary search is an efficient search algorithm used to locate a specific element in a sorted array or list. It works by repeatedly dividing the search space in half until the target element is found. …

July 8, 2023
Merge 2 sorted Array: Swift

Merging two sorted Int arrays in Swift means combining them into a single sorted array while preserving the order. With Swift, you can efficiently implement the merging algorithm. …

July 8, 2023
Merge 2 sorted Linked List: Swift

Merging two sorted linked lists in Swift is like combining two ordered lists into one, while still maintaining the sorted order. …

1 2 3