- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Ankita Saini has Published 319 Articles
Ankita Saini
510 Views
To convert the array of characters into a string Swift provides the following methods − Using String() initialiser Using append() method Input array = [“S”, “w”, “i”, “f”, “t”] Output Swift Here we join all the characters given in the array to create a string. Method ... Read More
Ankita Saini
1K+ Views
To check if the given string is empty or not Swift provides an inbuilt property named as isEmpty. This property will return true if the given string is empty. And return false if the given string is not empty. Here empty string means whose length is 0 or we can ... Read More
Ankita Saini
317 Views
In Swift, a dictionary is an unordered collection in which data is stored in the form of key-value pairs, where keys are the unique identifiers. So to check the equality of two dictionaries we first need to check if the size of both the dictionaries is equal or not. If ... Read More
Ankita Saini
886 Views
Swift provides an hasPrefix() function to check if a string starts with a specified substring. The hasPrefix() function returns a boolean value which indicates whether the specified substring matches the starting string characters of the input string. The hasPrefix() function is case sensitive, which means according to this function “a”, ... Read More
Ankita Saini
439 Views
Swift provides an hasSuffix() function to check a string end with a specified substring. The hasSuffix() function returns a boolean value which indicates whether the specified substring matches the ending characters of the input string. The hasSuffix() function is case sensitive that means according to this function “t”, and “T” ... Read More
Ankita Saini
75 Views
In Swift, a dictionary is an unordered collection in which data is stored in the form of key-value pairs. To add elements to a dictionary we can use any of the following methods − Using Bracket notation Using updateValue() method Method 1: Using Brackets Notation We can key-value ... Read More
Ankita Saini
135 Views
In Swift, a set is used to create an unordered collection of unique elements. To split a set into two halves we use a approach in which we first determine the midpoint of the given set using integer division method and then loop through the set and insert element ... Read More
Ankita Saini
394 Views
Selection sort algorithm in swift is a sorting algorithm, in which it select smallest or largest element from the given unsorted array and place that element at the beginning of the unsorted array. This process continue till the last unsorted element. So now we sort an array in descending order ... Read More
Ankita Saini
284 Views
Bubble sort algorithm in swift, is the easiest search algorithm. This algorithm sorts the elements by repeatedly swapping adjacent elements if they are not present at the right place. So now we sort an array in descending order using bubble sort. For example − Array - [4, 7, 1, 8] ... Read More
Ankita Saini
362 Views
Quick sort algorithm in swift is a sorting algorithm which works on divide and conquer approach. In this sort, we first divide the array into subarrays by selecting a pivot element. Here the division takes place in such a way, in which the smallest elements placed at the left side ... Read More
To Continue Learning Please Login
Login with Google