 
 Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Server Side Programming Articles - Page 275 of 2650
 
 
			
			836 Views
In Swift, we create a user defined function to rotate the elements of an array. In this function, first we find the total number of rotation and then rotate the array by the specified number of rotation. For example − Array = [3, 5, 2, 1, 7, 9] Rotation = 2 Resultant Array = [2, 1, 7, 9, 3, 5] Algorithm Step 1 − Create a function that rotate the elements of the array in the specified number of rotation. Step 2 − Inside the function first we find the required number of rotations. Step 3 − Then ... Read More
 
 
			
			263 Views
In swift, a set is a unordered collection that only contain unique values. As we known that a set is an unordered collection so their is no direct way like an array to reverse the elements of the set. However you can reverse a set by converting it into an array and then apply reversed() method or any user defined function. And then convert back the result into set. Let discuss this method with the help of examples. Example 1 In the following example, we will have a set of string type. Now we convert it into array to ... Read More
 
 
			
			424 Views
In swift, a set is used to create an unordered collection of unique elements. In Swift, to store a nil value in the set you need to define the set as a optional type because nil is a optional value. So to remove null for a set we can use inbuilt functions like remove() and filter(). Lets discuss both the methods in detail along with examples. Method 1: Using remove(_:) Function The remove(_:) function is used to remove or delete a specified element from the given set. Syntax func remove(ele) Where ele is the element which we want to ... Read More
 
 
			
			401 Views
In Swift, a set is used to create an unordered collection of unique elements. To remove a subset from a set Swift provide two insult functions named as subtract() and subtracting(). Lets discuss both the methods in detail along with examples. Method 1: Using subtract(_:) Function The subtract(_:) function is used to remove the given subset from the specified set. Syntax func subtract(_subset:mSet) Where mSet is the subset which we want to remove from the given set and it must be a finite set. This function return a set after removing the common elements of set and subset. Example ... Read More
 
 
			
			282 Views
In Swift, linear search is the most easiest search algorithm. It is also known as sequential search because it check all the elements of the given array or sequence one by one. If the target element is found, then return the index of that array otherwise return element not found. So lets check if the given array contains the target element or not using recursive linear search. Algorithm Step 1 − Create a function to check if the given element is present in the specified array or not using recursive linear search. Step 2 − Inside the function, we ... Read More
 
 
			
			847 Views
Just like other programming languages Swift also supported two- dimensional array. A two dimensional array is known as an array of array that store same type of data in a tabular format. Or we can say 2-D array is an array which represent homogeneous data in rows and columns. Syntax var twoDArray:[[Int]] = [[2, 3], [3, 4]] To read two-dimensional array from the user Swift provide an inbuilt function named as readLine(). The readLine() function read a string of characters from the input. If the EOF has already been reached when this function is called, then it will ... Read More
 
 
			
			557 Views
In Swift, a set is used to define a collection of unique elements, means a set doesn’t contains duplicate elements. In a set, the elements are not arranged in a particular order. To print a set we can use for-in loop, forEach() function, as well as the name of the set. Lets discuss all the methods one by one in detail along with examples. Method 1: Name of the Set To print a set we simply call the name of the set in the print() function. It will display set elements in the square bracket([]). Or we can say that ... Read More
 
 
			
			518 Views
Python is derived from many other languages including ABC, Modula-3, C, C++, Algol-68, SmallTalk, and UnixShell, and many other scripting languages. Now, as we know this article is all about converting a list of strings to comma-separated strings. Before diving deep into it, it’s necessary to know in detail about strings and lists in python. Let’s move ahead with the topic and understand them in detail. Starting off with string. What is a String? Python strings are sequences of characters, which means they are ordered collections of characters. "This is a string." 'This is also a string.' ... Read More
 
 
			
			12K+ Views
This article discusses how to remove null values from a Python list. Before proceeding, it is necessary to understand what a null value is? What a List is? Why it is necessary to remove null value from list. Let’s move ahead with the topic and understand them in detail. Let’s start with the Null value. Null Value is defined as a parameter that does not have a value. It indicates the absence of a value. Python has a special value for "Null" that shows a variable doesn't point to anything. But in Python there is no null, there ... Read More
 
 
			
			9K+ Views
Python is an interpreted, object–oriented, high level, programming language with dynamic semantics. Developed by Gudio Van Rossum in 1991. It supports multiple programming paradigms, including structured, object-oriented and functional programming. List are mutable means that you can change the values of list, like we can add an element, remove, repeat and allows indexing and slicing like strings an element from a list by using different operators. List can be created by using square brackets. By placing elements inside square bracket[ ], separate by commas. For example: list1= [“a”, ”b”]. There is a one more type of list known ... Read More