What do you want to save?
Add Code snippet
New code examples
-
C++ 2022-03-25 00:00:15
how to use array without size in c++
#include <iostream> int main() { //Create a user input size int size; std::cout << "Enter Size Of Array : "; std::cin >> size; //Create the array with the size the user input int *myArray = new int[size]; //Populate t... Add solution -
Java 2022-03-18 03:30:02
remove item from arraylist in java
// Java.util.ArrayList.remove(Object) method example import java.util.ArrayList; import java.util.List; public class ArrayListRemoveObjectMethod { public static void main(String[] args) { List<Integer> al = new ArrayList<>(); ... Add solution -
C 2021-11-21 03:08:14
rotate an array right in c
// C program to rotate an array cyclically #include <stdio.h> void rightRotateByOne(int arr[], int n) //function for cyclically rotating an array once { int x = arr[n-1], i; for (i = n-1; i > 0; i--) arr[i] = arr[i-1]; arr[0] = x... Add solution -
Java 2021-11-17 12:49:20
ArrayList trimToSize() method in java
import java.util.ArrayList; public class TrimToSizeMethodJavaExample { public static void main(String[] args) { // initially size of ArrayList is 10 ArrayList<Integer> al = new ArrayList<Integer>(10); // adding integers... Add solution -
C++ 2021-11-13 01:16:11
heap sort heapify and max heap in binary tree
Implementation of heap sort in C: #include <stdio.h> int main() { int heap[10], array_size, i, j, c, root, temporary; printf("\n Enter size of array to be sorted :"); scanf("%d", &array_size); printf("\n Ent... Add solution -
C++ 2021-11-12 21:23:17
gfg cyclic array rotation
// C program to rotate an array cyclically #include <stdio.h> void rightRotateByOne(int arr[], int n) //function for cyclically rotating an array once { int x = arr[n-1], i; for (i = n-1; i > 0; i--) arr[i] = arr[i-1]; arr[0] = x... Add solution -
Java 2021-11-11 04:43:22
arraylist length java
import java.util.ArrayList; /* * Java Program to find the length of ArrayList. * */ public class ArrayListDemo{ public static void main(String[] args) { System.out.println("Welcome to Java Program to find the length of array list"); ... Add solution -
Java 2021-11-07 06:34:22
java list length
import java.util.ArrayList; /* * Java Program to find the length of ArrayList. * */ public class ArrayListDemo{ public static void main(String[] args) { System.out.println("Welcome to Java Program to find the length of array list"); ... Add solution -
C 2021-11-07 01:59:12
Rotation of array in C++
// C program to rotate an array cyclically #include <stdio.h> void rightRotateByOne(int arr[], int n) //function for cyclically rotating an array once { int x = arr[n-1], i; for (i = n-1; i > 0; i--) arr[i] = arr[i-1]; arr[0] = x... Add solution