# Trending March 2024 # Sort Array 0S,1S And 2S # Suggested April 2024 # Top 9 Popular

You are reading the article Sort Array 0S,1S And 2S updated in March 2024 on the website Katfastfood.com. We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested April 2024 Sort Array 0S,1S And 2S

Introduction to Sort Array 0s, 1s and 2s

When working with arrays, sorting them in a specific way is often necessary. One common problem is Sort Array 0s,1s, and 2s. In this, the problem can be solved in linear time (i.e., O(n)) and constant space (i.e., O(1)) using a technique called the “Dutch National Flag Algorithm.” The algorithm works by maintaining three-pointers that divide the array into three sections: the low section for 0s, the midsection for 1s, and the high section for 2s. The algorithm traverses the array once and swaps the elements to group them into their respective sections. The goal is to rearrange the elements of the array so that all the 0’s come first, followed by all the 1’s, and then all the 2s.

Start Your Free Software Development Course

Definition

Basically, Sort Array 0s,1s, and 2s means arranging the elements of the array such that all the 0s appear before the 1s and all the 1s appear before the 2s. The problem of sorting such an array involves arranging the elements of the array in ascending order such that all the 0s appear before the 1s and all the 1s appear before the 2s. This problem is also known as the Dutch national flag problem, named after the Dutch national flag, which has three horizontal bands of red, white, and blue, and it was first introduced by Edsger Dijkstra, a Dutch computer scientist.

The problem arises when an array of integers needs to be partitioned into three groups based on their values This problem has several solutions, including counting the occurrences of 0s, 1s, and 2s and then reconstructing the array in the correct order, using a two-pointer approach, or using a variation of quicksort. The algorithm achieves this by maintaining three-pointers to the array: one for the low end of the 0s, one for the high end of the 2s, and one for the current element being examined. By comparing the current element to the values at the low and high ends, the algorithm moves the elements around until the array is sorted in the desired order.

An example would be an 11-element array with the following values: 0, 1, 1, 2, 2, 1, 0. Our primary task is sorting an array so that all 0s come before all on1s, all 1s before all 2s, and finally, all 2s will fill out the remaining array.

Arr={0 ,2 ,1 ,2, 0, 1, 1 ,2, 0, 2, 1, 0, 1, 0}

Now let’s see the sorted version of the array.

Sorted_Version={0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2}

Methods of Sort Array 0s,1s and 2s

There are two sorting methods used as follows.

1. Brute force approach with the help of double traversal

The brute force approach with double traversal-sort array 0s, 1s, and 2s can be used to sort an array containing only three distinct elements (0s, 1s, and 2s). This approach involves two traversals of the array, and it works by counting the number of 0s, 1s, and 2s in the array in the first traversal and then placing them in the correct order in the second traversal. By using this, we can sort the array in ascending order. In this method, we will see how to write the algorithm for n numbers elements for random numbers as follows.

Count the number of elements.

In the second step, we need to scan all the array elements from left to right one by one.

After scanning, we need to count all 0s from the array list and store them in another.

In the same way, we need to count all 1s from the array list and store them in another variable.

Finally, like the above two steps, we need to count all 2s from the array and store them in another.

If the user enters the elements of an array at runtime, the user must enter the values only in the format of 0s, 1s, and 2; you cannot be sure that the values entered by the user are all in these formats.

In the above example, we have 5 in 0’s, 5 in 1’s, and 4 in 2’s.

Now the step, we need to copy all values into the array. Start a loop at the 0th index of an array to copy the values; to begin with, duplicate all quantities of 0’s present in the exhibit while increasing the list esteem. Up to index number 4, all of the 0s will be copied.

Similarly, copy 1’s and 2’s.

Code:

package com.array; import java.util.Scanner ; class Array { static void arraysort ( int [] a_xxx , int num ) { int c_zero = 0 ; int c_one = 0 ; int c_two = 0 ; int i = 0 ; while ( i < num ) { if ( a_xxx [ i ] == 0 ) { c_zero = c_zero + 1 ; } if ( a_xxx [ i ] == 1 ) { c_one = c_one + 1 ; } if ( a_xxx [ i ] == 2 ) { c_two = c_two + 1 ; } i = i + 1 ; } i = 0 ; while ( i < c_zero ) { a_xxx [ i ] = 0 ; i = i + 1 ; } while ( i < c_one + c_zero ) { a_xxx [ i ] = 1 ; i = i + 1 ; } while ( i < c_two + c_one + c_zero ) { a_xxx [ i ] = 2 ; i = i + 1 ; } } public static void main ( String args[] ) { int num ; Scanner obj_arrayx = new Scanner ( chúng tôi ) ; num = obj_arrayx.nextInt() ; int [] a_xxx = new int[ 100 ] ; for ( int i = 0 ; i < num ; i++ ) { a_xxx [ i ] = obj_arrayx.nextInt() ; } arraysort( a_xxx , num ) ; for ( int i = 0 ; i < num ; i++ ) { System.out.println ( a_xxx [ i ] ) ; } } }

Output:

2. By using the optimized method of three-way partitioning with single traversal

To sort an array of 0s, 1s, and 2s, we can use the optimized method of three-way partitioning with a single traversal. The idea behind this algorithm is to maintain three pointers – low, mid, and high- representing the boundaries of three sub-arrays: 0s, 1s, and chúng tôi this method, we can traverse only a single time. Generally, this approach divides us into three different pointers as follows.

Section 1: In this section, we are counting all 0’s that are 0 to low -1.

Section 2: In this section, we count all 1’s that are low to mid -1.

Section 3: In this section, we count all unknown values mid to high-1.

Now let’s see an algorithm.

Count the number of elements.

In the second step, we must divide it into three sections we already discussed.

At the initial stage, we cannot find how many 0’s, 1’s, and 2’s, so we need to point to two pointers, low =0 and mid =0.

In the next step, we must execute the loop up to the 13.

If the mid pointer gets 0, first swap it with the present value at low and increment the pointer by 1, which is low and mid + 1.

If the mid pointer gets 1, then increment the mid pointer by 1 and continue the loop.

If the mid pointer gets 2, first swap the present value with a high pointer and increment the high pointer by 1.

Loop will continue to reach the high pointer and finally get the sorted array.

Code:

package com.array; import java.util.Scanner ; class Array { static void arraysort ( int [] a_xxx , int num ) { int arry_low = 0 ; int arry_mid = 0 ; int arry_high = num - 1 ; while ( arry_mid <= arry_high ) { if ( a_xxx [ arry_mid ] == 0 ) { int tmp = a_xxx [ arry_mid ] ; a_xxx [ arry_mid ] = a_xxx [ arry_low ]; a_xxx [ arry_low ] = tmp ; arry_low = arry_low + 1 ; arry_mid = arry_mid + 1 ; } else if ( a_xxx [ arry_mid ] == 1 ) { arry_mid = arry_mid + 1 ; } else { int tmp = a_xxx [ arry_mid ] ; a_xxx [ arry_mid ] = a_xxx [ arry_high ] ; a_xxx [ arry_high ] = tmp ; arry_high = arry_high - 1 ; } } } public static void main ( String args[] ) { int num ; Scanner obj_arrayx = new Scanner ( chúng tôi ) ; num = obj_arrayx.nextInt() ; int [] array_sort = new int[ 100 ] ; for ( int i = 0 ; i < num ; i++ ) { array_sort[ i ] = obj_arrayx.nextInt() ; } arraysort( array_sort , num ) ; for ( int i = 0 ; i < num ; i++ ) { System.out.println ( array_sort[ i ] ) ; } } }

After execution, we get the below result, as shown in the screenshot.

Output:

Conclusion

In conclusion, Sort Array 0s,1s, and 2s can be solved using various approaches. The Dutch National Flag algorithm involves maintaining three-pointers, low, mid, and high, and partitioning the array into three sections. The time complexity of all these approaches is O(n), where n is the size of the array. We can traverse the array using a third pointer and swap the values as necessary until all the 0s are at the beginning, 1s in the middle, and 2s at the end. This problem is a good exercise for practicing array manipulation and pointer operations in programming.

Recommended Article

We hope that this EDUCBA information on “Sort Array 0s,1s, and 2s” was beneficial to you. You can view EDUCBA’s recommended articles for more information.

You're reading Sort Array 0S,1S And 2S

## Data Structure And Algorithms Selection Sort

Data Structure and Algorithms Selection Sort

Selection sort is a simple sorting algorithm. This sorting algorithm is an in-place comparison-based algorithm in which the list is divided into two parts, the sorted part at the left end and the unsorted part at the right end. Initially, the sorted part is empty and the unsorted part is the entire list.

The smallest element is selected from the unsorted array and swapped with the leftmost element, and that element becomes a part of the sorted array. This process continues moving unsorted array boundary by one element to the right.

This algorithm is not suitable for large data sets as its average and worst case complexities are of Ο(n2), where n is the number of items.

How Selection Sort Works?

Consider the following depicted array as an example.

For the first position in the sorted list, the whole list is scanned sequentially. The first position where 14 is stored presently, we search the whole list and find that 10 is the lowest value.

So we replace 14 with 10. After one iteration 10, which happens to be the minimum value in the list, appears in the first position of the sorted list.

For the second position, where 33 is residing, we start scanning the rest of the list in a linear manner.

We find that 14 is the second lowest value in the list and it should appear at the second place. We swap these values.

After two iterations, two least values are positioned at the beginning in a sorted manner.

The same process is applied to the rest of the items in the array.

Following is a pictorial depiction of the entire sorting process −

Now, let us learn some programming aspects of selection sort.

Algorithm Step 1 − Set MIN to location 0 Step 2 − Search the minimum element in the list Step 3 − Swap with value at location MIN Step 4 − Increment MIN to point to next element Step 5 − Repeat until list is sorted Pseudocode procedure selection sort list : array of items n : size of list for i = 1 to n - 1 /* set current element as minimum*/ min = i /* check the element to be minimum */ for j = i&plus;1 to n if list[j] < list[min] then min = j; end if end for /* swap the minimum element with the current element*/ if indexMin != i then swap list[min] and list[i] end if end for end procedure

## C++ Program To Push An Array Into Another Array

A linear sequential data structure called an array is used to store homogeneous data in a series of memory regions. An array needs to have certain features to insert, delete, traverse, and update elements effectively, just like other data structures do. Our arrays in C++ are static. In addition, C++ offers a few dynamic array structures. There may be a maximum of Z elements that can be stored inside a static array. And there are currently n elements in it. In this article, we will see how to push the elements of one array inside another array in C++.

Understanding the concept with examples Given array A = [10, 14, 65, 85, 96, 12, 35, 74, 69] Another given array B = [56, 42, 15, 18, 20, 32] Pushing the elements of B into A, signifies that A becomes: A = [10, 14, 65, 85, 96, 12, 35, 74, 69, 56, 42, 15, 18, 20, 32]

In the above example, it is clear that we have two arrays A and B. Pushing B into A means inserting all elements present in B into the array A. The elements will be added at the end of A. But to implement this, we must check one thing the remaining slots in A (which is the maximum size of A − the number of existing elements in A) are the same or greater than the number of elements in B. Otherwise we cannot push them inside A. Let us see the algorithm along with the C++ implementation code.

Algorithm

take the array A and B as input, the number of elements n in A as input, the number of elements m in B as input

If A has enough space to hold the entire B, then

for each element e in B, do

append e to array A

end for

end if

return array A and new size n

Example

# define Z 50

using namespace std;

void displayArr(int arr[], int n){ for( int i = 0; i < n; i++ ){ cout << arr[ i ] << “, “; } cout << endl; } void insertAtEnd( int arr[], int &n, int e ){ if( n < Z ) { arr[ n ] = e; } n = n + 1; }

void pushArrayToAnother( int A[], int &n, int B[], int m ) { for( int i = 0; i < m; i++ ) { insertAtEnd( A, n, B[i] ); } } }

int main() { int A[ Z ] = {57, 10, 14, 19, 86, 52, 32, 14, 76, 65, 32, 14}; int n = 12;

int B[ Z ] = {56, 84, 23, 12, 17, 19, 65, 32}; int m = 8;

cout << “First Array: “; displayArr( A, n );

cout << “Second Array: “; displayArr( B, m );

pushArrayToAnother( A, n, B, m ); cout << “Array A after pushing B:” << endl; displayArr( A, n ); }

Output First Array: 57, 10, 14, 19, 86, 52, 32, 14, 76, 65, 32, 14, Second Array: 56, 84, 23, 12, 17, 19, 65, 32, Array A after pushing B: 57, 10, 14, 19, 86, 52, 32, 14, 76, 65, 32, 14, 56, 84, 23, 12, 17, 19, 65, 32, Using Dynamic Arrays or Vectors

The same thing can be done using vectors. Vectors are dynamic arrays present inside C++ STL. If we consider vectors, we do not need to care about the available spaces to insert elements. Because vectors are dynamic. It will automatically add new slots when needed. The algorithm is the same without available slot checking.

Algorithm

take the array A and B as input, the number of elements n in A as input, the number of elements m in B as input

for each element e in B, do

append e to array A

end for

return array A and new size n

Example

# define Z 50

using namespace std;

for( int i = 0; i < v.size() ; i++ ) { cout << v[ i ] << “, “; } cout << endl; }

for( int i = 0; i < B.size() ; i++ ) { A.push_back( B[i] ); } }

int main(){

cout << “First Array: “; displayArr( A );

cout << “Second Array: “; displayArr( B );

pushArrayToAnother( A, B ); cout << “Array A after pushing B:” << endl; displayArr( A ); }

Output First Array: 57, 10, 14, 19, 86, 52, 32, 14, 76, 65, 32, 14, Second Array: 56, 84, 23, 12, 17, 19, 65, 32, Array A after pushing B: 57, 10, 14, 19, 86, 52, 32, 14, 76, 65, 32, 14, 56, 84, 23, 12, 17, 19, 65, 32, Using the insert() function in vectors

The previous method is a manual process. However, we can do the same thing using the insert() function in vector STL. The insert() function takes a position pointer (using an iterator) and an iterator to copy from one container object and copy the elements into another container object from the position index. Let us see the C++ implementation for a clear view.

Example

# define Z 50

using namespace std;

for( int i = 0; i < v.size() ; i++ ){ cout << v[ i ] << “, “; } cout << endl; }

A.insert( A.end(), B.begin(), B.end() ); }

int main() {

cout << “First Array: “; displayArr( A );

cout << “Second Array: “; displayArr( B );

pushArrayToAnother( A, B ); cout << “Array A after pushing B:” << endl; displayArr( A ); }

Output First Array: 57, 10, 14, 19, 86, 52, 32, 14, 76, 65, 32, 14, Second Array: 56, 84, 23, 12, 17, 19, 65, 32, Array A after pushing B: 57, 10, 14, 19, 86, 52, 32, 14, 76, 65, 32, 14, 56, 84, 23, 12, 17, 19, 65, 32, Conclusion

In this article, we have seen a few different approaches to inserting or pushing one array element at the end of another array. In the first example, simple C++ arrays are used where we need special care about the available spaces inside the static array. In the next two methods, we do not need to care about this because we are using vectors which is dynamic and will automatically allocate spaces whenever it needs.

## C++ Program To Implement Merge Sort

The merge sort technique is based on divide and conquer technique. We divide the while data set into smaller parts and merge them into a larger piece in sorted order. It is also very effective for worst cases because this algorithm has lower time complexity for worst case also.

The complexity of Merge Sort Technique

Time Complexity: O(n log n) for all cases

Space Complexity: O(n)

Input − The unsorted list: 14 20 78 98 20 45 Output − Array after Sorting: 14 20 20 45 78 98 Algorithm merge(array, left, middle, right)

Input: The data set array, left, middle and right index

Output: The merged list

Begin    nLeft := m - left+1    nRight := right – m    define arrays leftArr and rightArr of size nLeft and nRight respectively    for i := 0 to nLeft do       leftArr[i] := array[left +1]    done    for j := 0 to nRight do       rightArr[j] := array[middle + j +1]    done    i := 0, j := 0, k := left    while i < nLeft AND j < nRight do       if leftArr[i] <= rightArr[j] then          array[k] = leftArr[i]          i := i+1       else          array[k] = rightArr[j]          j := j+1          k := k+1    done while i < nLeft do array[k] := leftArr[i] i := i+1 k := k+1 done while j < nRight do array[k] := rightArr[j] j := j+1 k := k+1 done End mergeSort(array, left, right)

Input: An array of data, and lower and upper bound of the array

Output: The sorted Array

Begin if lower < right then mid := left + (right - left) /2 mergeSort(array, left, mid) mergeSort (array, mid+1, right) merge(array, left, mid, right) using namespace std; void swapping(int &a, int &b) {        int temp;    temp = a;    a = b;    b = temp; } void display(int *array, int size) {    for(int i = 0; i<size; i++)       cout << array[i] << " ";    cout << endl; } void merge(int *array, int l, int m, int r) {    int i, j, k, nl, nr;    //size of left and right sub-arrays    nl = m-l+1; nr = r-m;    int larr[nl], rarr[nr];    //fill left and right sub-arrays    for(i = 0; i<nl; i++)       larr[i] = array[l+i];    for(j = 0; j<nr; j++)       rarr[j] = array[m+1+j];    i = 0; j = 0; k = l;    //marge temp arrays to real array    while(i < nl && j<nr) {       if(larr[i] <= rarr[j]) {          array[k] = larr[i];          i++;       }else{          array[k] = rarr[j];          j++;       }       k++;    } while(i<nl) { array[k] = larr[i]; i++; k++; } while(j<nr) { array[k] = rarr[j]; j++; k++; } } void mergeSort(int *array, int l, int r) { int m; if(l < r) { int m = l+(r-l)/2; mergeSort(array, l, m); mergeSort(array, m+1, r); merge(array, l, m, r); } } int main() { int n; cout << "Enter the number of elements: "; int arr[n]; cout << "Enter elements:" << endl; for(int i = 0; i<n; i++) { } cout << "Array before Sorting: "; display(arr, n); mergeSort(arr, 0, n-1); cout << "Array after Sorting: "; display(arr, n); } Output Enter the number of elements: 6 Enter elements: 14 20 78 98 20 45 Array before Sorting: 14 20 78 98 20 45 Array after Sorting: 14 20 20 45 78 98

## Print 2D Array In Java

Introduction to Print 2D Array in Java

When we want to store elements for a similar type in Java, we take the name of Array. Array stores elements of similar type viz: integer, string, etc. Moreover, the dimension of the array also varies in Java according to your requirements. Therefore, whenever you have data in a 2D array, you need to print those elements.

There are different types of techniques, those you can choose for printing the elements of a two-dimensional array in java. You can use any of those techniques for printing the elements of a two-dimensional array.

Let us see the techniques one by one. We will start with the syntax first.

Syntax of 2D Array in Java

In the case of the 2D array, the values are stored in a matrix format, which means it is based on row and column index. You can follow any of the below syntaxes for the declaration of an array in java.

Syntax:

dataType[][] reference_variable name; dataType [][]reference_variable name; dataType reference_variable name [][]; dataType []reference_variable name [];

You can follow the below example to create an instance of a two-dimensional array in java of integer type; the number of rows and columns here is 5.

int[][] matrx=new int[5][5];

You can follow the below example for the initialization of a 2D Array in Java.

matrx [0][0]=51; matrx [0][1]=62; matrx [0][2]=73; matrx [1][0]=84; matrx [1][1]=95; matrx [1][2]=46; matrx [2][0]=37; matrx [2][1]=18; matrx [2][2]=29; Examples to Print 2D Array in Java

Below are some examples of how to print a 2d array in java:

Example #1 – Two Dimensional Array of the Same Number of Rows and Columns

In the below example, we will show an example of how to print an array of integers in java.

Code:

public class Print2DArrayInJava { public static void main(String[] args) { final int[][] matrx = { { 11, 22}, { 41, 52}, }; for (int r = 0; r < matrx.length; r++) {       //for loop for row iteration. for (int c = 0; c < matrx[r].length; c++) {   System.out.print(matrx[r][c] + " "); } System.out.println(); } } }

Output:

Example #2 – Jagged Array in Java

When a number of rows and columns are not equal in a multidimensional array in java, we call it a Jagged array in Java. Here the number of columns differs from that of its rows.

In the below example, we will show an example of how to print a jagged array of integers in java.

Code:

public class PrintJaggedArrayInJava { public static void main(String[] args) { int matrx[][] = new int[2][]; matrx[0] = new int[3]; matrx[1] = new int[5]; int cnt = 1; for (int r=0; r<matrx.length; r++) for(int c=0; c<matrx[r].length; c++) matrx[r][c] = cnt++; for (int r=0; r<matrx.length; r++){ for (int c=0; c<matrx[r].length; c++){ System.out.print(matrx[r][c]+" "); } System.out.println();//printing of new line } } }

Output:

Example #3 – Two Dimensional Array of String in Java

In the below example, we will show an example of how to print a 2D array of strings in java.

Code:

public class Print2DArrayInJava { public static void main(String[] args) { String[][] matrx = {{"OnePlus", "Pixel"}, {"Apple", "Oppo"}}; for (int r = 0; r < matrx.length; r++) {         for (int c = 0; c < matrx[r].length; c++) {   System.out.print(matrx[r][c] + " "); } System.out.println(); } } }

Output:

Top 3 Methods to Print 2D Array in Java

Methods for printing 2d arrays in java are explained below:

Method #1 – Using for Loop

For loop is used for iteration, and hence we will use for loop to iterate elements of an array in java.

Code:

public class PrintUsingForLoop { public static void main(String[] args) { final int[][] ar = { { 5, 9 }, { 2, 4 } }; for (int r = 0; r < ar.length; r++) {         for (int c = 0; c < ar[r].length; c++) {   System.out.print(ar[r][c] + " "); } System.out.println(); } } }

Output:

Method #2 – Using for-each Loop

To traverse through an array, we can also use the for-each loop.

Code:

import java.util.*; public class PrintUsingForEachLoop { public static void main(String[] args) { int[][] rec = new int[2][2]; rec[0][0] = 15; rec[0][1] = 25; rec[1][0] = 35; rec[1][1] = 45; for(int[] rc: rec){  System.out.println(Arrays.toString(rc)); } } }

Output:

Method #3 – Using Arrays.deepToString() Method

Here we will use Arrays.deepToString() method of java.util.Arrays package does a deep conversion into a string of an array. To use this method, we need to import the package java.util.Arrays.

Code:

import java.util.*; public class PrintUsingDeepToString { public static void main(String[] args) { int[][] rec = {{37, 57}, {47, 58}}; System.out.println(Arrays.deepToString(rec)); } }

Output:

In the above output, the levels of square brackets denote the dimension of the array, which is 2.

Conclusion

So, in this module, we have learned about different techniques on how to print 2 D array in Java. This is nothing new if we compare it to print single dimensional array, except the fact that you need to modify in the declaration, initialization and printing part of the code carefully. If you are a master in a single-dimensional array, this will be just an extension of that. I have also put code examples. You need to exercise those and tally your output with the given outputs. Hands-on by yourself is a must in order to master coding.

Recommended Articles

This is a guide to Print 2D Array in Java. Here we discuss the top 3 methods of how to print a 2D array in java, along with different examples. You may also look at the following articles to learn more –

## What Is Diversity Array Technology (Dart)?

Introduction

Genetic diversity can be defined as the variation in the traits that are passed from one generation to another within a species. More is the genetic diversity more is the variation in the traits. This genetic variation can be utilized to determine the sequence information of an individual. Utilization of genetic diversity to analyse and create genetic map is called diversity arrays technology (DArT).

DArT is a comparatively newer approach to assess polymorphism which has been developed due to limitations of existing molecular marker techniques. This technique has been successfully utilized in the plant breeding programmes.

What is Diversity array technology (DArT)

DArT is a novel technology which does not dependent on the sequence of organism, high-throughput technique and is capable of detecting many markers in one experiment. It provides a cheaper, more practical and fingerprinting of whole genome approach to stud and map the diversity among the individuals. This technique was developed by Kaiman Peng, Andrzej Killian, David Feinstein and Damian Jaccoud in 2001.

This technique a little amount of initial DNA can be used to analyse large amount of samples. Also, it is faster and far more cost effective as compared to other molecular markers like single nucleotide polymorphism (SNPs).

Steps Involved in DArT

DArT mainly involves three steps, they are −

Reduction of complexity.

Representation of genomic DNA.

Assay.

Reduction of Complexity

In this step certain restriction enzymes are used to cleave large genomic DNA from a specific species of interest into numerous smaller fragments as genomic DNA is relatively complex and cannot be managed easily.

As the sample to be analysed contain elevated polymorphism therefore the coupling between restriction enzyme to be selected and primer for annealing becomes crucial.

The restriction enzyme used should be highly specific for the non-repetitive sequences, nonmethylated genome of the species. One of the most commonly used restriction enzymes with these qualities is PstI which is a type II restriction endonuclease and has been widely used in cloning, RFLP and genotyping.

Representation of Genomic DNA

After the digestion of genomic DNA using specific restriction enzymes, this step involves the selection of the digest that contains the largest quantity of polymorphism in the gene pool, which is of significance.

Since these smaller fragments act as the representatives of the much larger genomic DNA, they are known as representations.

DArT

After representations are produced double stranded DNA is produced by the joining of the digested fragments using T4 ligase a small amount of which is diluted and amplified using polymerase chain reaction.

It is important to use restriction site complementary primers and he variant of Taq polymerase which cannot be inhibited during polymerase chain reaction.

The product is then mixed with the representation and then it is inserted to a vector. This vector is then transformed into a suitable host by either chemical method or by electrical shock method.

The transformed cells are then incubated in a suitable medium and allowed to grow and selection is done based on antibiotic resistance in X-gal medium.

Then inserts are amplified by polymerase chain reaction and then product is inserted in the microarray slides. The slides are centrifuged to isolate the insert which is then purified.

One more technique which uses software and fluorescent probes for the detection of polymorphism and that software is known as DArTsoft.

It is the user of this technique who decides the scope of the genetic analysis and it can be used for certain species and can be expanded to the wild varieties also.

This technology has a very high throughput it means that it has the ability to identify numerous polymorphic markers in parallel. The cost of this technique is very less as compared to others and this can be reduced further.

Applications of DArT

Like RFLP, SNPs, AFLP etc. this can also be used as genetic marker. With this technique genomic profiles of any crop can be obtained at low cost.

They can also be used for the collection of germ plasm which can be used for recognition and management of biodiversity.

This method is so fast that it allows plant breeder to map quantitative trait loci (QTL) in less time which allow them to emphasize on more important factors in plant breeding. Like reliable and precise phenotyping.

Since it has wide application in agricultural biotechnology, so it an be used in developing countries to increase the pace of plant breeding and maintaining the biodiversity.

Conclusion

DArT is relatively unique tool which helps in DNA profiling without the requirement of genome sequence. It is a proven tool in the field of plant breeding with much lesser cost. DArT has been successfully implemented in some cereals like wheat, barley and rice, also more research work is going on to develop it in certain varieties of sorghum, chickpea and pigeon pea, which can have a greater impact on developing countries.

Update the detailed information about Sort Array 0S,1S And 2S on the Katfastfood.com website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!