• Register

Recent posts tagged arrays

27 0 1 min.
Overview:Today we will count even and odd numbers in our program. You will be given an array. You will count even and odd numbers in it.Even & odd in c++ code:#include <stdio.h> void main() { int array[80], i, num; ...
posted Jul 18 Tania 800 points
15 0 1 min.
Introduction:Smallest number is:12Largest number is:87Java students face a lot of difficulties when they are practicing their program. Because Java codes are very long and most of the students get stuck in the program with a small mistake.  They...
posted Jul 11 Tania 800 points
12 2 3 min.
Vаriаble  sized  аrrаys  in  С++Meаning  оf  Vаriаble  Sized  аrrаysVаriаble  length  аrrаys  саn  hаve  а  size  аs  required  by  the  user  i.e &nb...
posted Jul 11 sakshi 886 points
12 1 3 min.
Difference between lists and arrays in pythonArrays and lists are both used in Python to store data, but they don't serve exactly the same purposes. They both can be used to store any data type (real numbers, strings, etc), and they both can...
posted May 29 Sanjana Sagar 499 points
0 0 1 min.
Shuffling a given array in javaimport java.util.ArrayList; class test { public static void main(String[] args) { Integer[] array = {3, 5, 95, 4, 15, 34, 3, 6, 5}; ArrayList<Integer> list = new ArrayList<>(java.ut...
posted May 19 Davud 100 points
0 0 3 min.
Comparing two arrays in javascript returning differences1. Using Array.prototype.filter() functionYou can use the filter() method to find the elements of the first array which are not in the second array. This filtering can be done using th...
posted May 19 Sanjana Sagar 499 points
0 1 1 min.
In this section, we are going to learn how to return an array in Java.Remember:A method can return a reference to an array.The return type of a method must be declared as an array of the correct data type.import java.util.Arrays; public class Retur...
posted May 18 muliemes 100 points
0 0 1 min.
We can also print the Java array using for-each loop. The Java for-each loop prints the array elements one by one. It holds an array element in a variable, then executes the body of the loop.The syntax of the for-each loop is given below:for(dat...
posted May 18 muliemes 100 points
0 2 2 min.
What are arraysAn array is a data structure that can have a data type and that stores a specified amount of elements of the same data type in it. It is basically like a small database and It is a very useful tool that you will come accross a lot...
posted Apr 26 Tegra Balonga 500 points
0 0 1 min.
This is a way of creating an immutable copy of a 2 dimensional array in js if you want to mutate the second array without affecting the original.Steps (assuming you already have a “board[]” array created)// Create original array let board...
posted Apr 7 Davud 100 points
0 1 3 min.
An array in programming is a collection of items or data of the same data type. For example an array of names would be a string array in which the items would be like “John”, “James”, “Kate” etc. Arrays are useful ...
posted Oct 20, 2020 Faizan 100 points
0 0 1 min.
​ In this post, we tend to feature a comprehensive article that explains the matter with making Generic Array. Java has the Collections Framework, providing a library of generic information structures to be used in Java package development. The Colle...
posted Oct 9, 2020 Hasnain_khan 100 points
0 0 1 min.
Sometimes in life, you may wanna convert a matrix into a one dimensional array for the sake of the simplicity or maybe some other causes.And here’s when this article will come in handy.Attached within this article is the function needed to conv...
posted Sep 15, 2020 Michel Maalouly 100 points
0 0 6 min.
Being a major principle in the foundations of the Computer Science field, a good Data Structure implementation is crucial to have a clean and optimized code.It all started with 2 structures called: Array and LinkedList. And all other DS are deri...
posted Sep 12, 2020 Michel Maalouly 100 points
To see more, click for the full list of questions or popular tags.