We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

Tag: Array

Create a Singly Linked List from an array

Singly Linked List

Suppose we have an int array and we want to create it into a singly linked list from it. Singly Linked List Our Node structure is, Advertisements struct node {     int value;     node * nextPtr;         node(int val)     {         value = val;         nextPtr = NULL;        …

Create a Singly Linked List from an arrayRead More

Initializing a HashSet from an Array or a Collection

In this Article we will discuss how to initialize a HashSet using a Array or a Collection. HashSet has a Constructor that receives a Collection as an argument and initializes the new Set with the elements of passed collection object. Advertisements public HashSet(Collection<? extends E> c) Initializing a HashSet with an array Suppose we need to …

Initializing a HashSet from an Array or a CollectionRead More

np.array() : Create Numpy Array from list, tuple or list of lists in Python

In this article we will discuss how to create a Numpy Array from a sequence like list or tuple etc. Also, how to create a 2D numpy Numpy Array from nested sequence like lists of lists. np.array() – Creating 1D / 2D Numpy Arrays from lists & tuples in Python To install the python’s numpy module …

np.array() : Create Numpy Array from list, tuple or list of lists in PythonRead More

Find max value & its index in Numpy Array | numpy.amax()

In this article we will discuss how to get the maximum / largest value in a Numpy array and its indices using numpy.amax(). numpy.amax() Python’s numpy module provides a function to get the maximum value from a Numpy array i.e. Advertisements numpy.amax(a, axis=None, out=None, keepdims=<no value>, initial=<no value>) Arguments : a : numpy array from …

Find max value & its index in Numpy Array | numpy.amax()Read More

numpy.arange() : Create a Numpy Array of evenly spaced numbers in Python

In this article we will discuss how to create a Numpy array of evenly spaced numbers over a given interval using numpy.arrange(). numpy.arrange() Python’s numpy module provides a function to create an Numpy Array of evenly space elements within a given interval i.e. numpy.arange([start, ]stop, [step, ]dtype=None) Arguments: Advertisements start : It’s the start value …

numpy.arange() : Create a Numpy Array of evenly spaced numbers in PythonRead More

Python : Find unique values in a numpy array with frequency & indices | numpy.unique()

In this article we will discuss how to find unique values / rows / columns in a 1D & 2D Numpy array. Also how to find their index position & frequency count using numpy.unique(). numpy.unique() Python’s numpy module provides a function to find the unique elements in a numpy array i.e. Advertisements numpy.unique(ar, return_index=False, return_inverse=False, return_counts=False, …

Python : Find unique values in a numpy array with frequency & indices | numpy.unique()Read More

Cart

Your Cart is Empty

Back To Shop