- 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
4K+ Views
This article will teach us how to write a swift program to print an array. To print an array, we are using the following methods − Using array name Using for loop Using a while loop Using forEach() method Method 1: Print the array using the array name We ... Read More
Ankita Saini
1K+ Views
This article will teach us how to write a swift program to print a 2D array. Here we use the following methods − Using array name Using nested for loop Using subscript. Using forEach() method. Method 1: Print the 2D array using the array name We can print ... Read More
Ankita Saini
822 Views
This article will teach us how to write a swift program to find common array elements. So here we use the following methods − Using the filter method Using sets But before moving to the methods, we first understand common elements with the help of an example. Suppose we ... Read More
Ankita Saini
197 Views
In this article, we will learn how to write a swift program to count the elements of an array. To count the elements of an array swift provide a count property. This property will return the total number of elements present in the specified array. For example − Arr ... Read More
Ankita Saini
3K+ Views
In this article, we will learn how to write a swift program to check whether two arrays are equal. To check if two arrays are equal to not either, we are going to use the following two methods − using == operator elementsEqual(_:) method. Both method and ... Read More
Ankita Saini
3K+ Views
In this article, we will learn how to write a swift program to check if an array is empty. Here we use two methods: Using isEmpty property Using conditional statements Method 1: Using isEmpty Property To check if an array is empty Swift provides an isEmpty property. This ... Read More
Ankita Saini
304 Views
This tutorial will discuss how to write swift program to print Pascal’s triangle. A pascal’s triangle is a triangular array of the binary coefficient. It is a never ending equilateral triangle which always follows the rule of adding two numbers from the above row to get the number of below ... Read More
Ankita Saini
110 Views
This tutorial will discuss how to write swift program to check whether a number can be expressed as a sum of two prime numbers. Prime numbers are those numbers that are greater than 1 and has exactly two factors that is 1 and the number itself. For example, 7 is ... Read More
Ankita Saini
197 Views
This tutorial will discuss how to write swift program to get the remainder of float numbers using library function. A number with fractional component is known as float numbers. For example, 34.5, 2.1, 0.2, etc. We can divide two float numbers with each other to find the remainder and quotient. ... Read More
Ankita Saini
239 Views
This tutorial will discuss how to write swift program to print spiral pattern. Numeric pattern is a sequence of numbers which is used to develop different patterns or shapes like pyramid, rectangle, cross, etc. These numeric patterns are generally used to understand or practice the program flow controls, also they ... Read More