Arnab Chakraborty has Published 3734 Articles

Construct a distinct elements array with given size, sum and element upper bound in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 27-Aug-2020 14:14:11

212 Views

Suppose we have one size variable N, we also have one variable SUM this is the total sum of all elements available in the array and another variable K such that there is no element in array is greater than K, We have to find one orthogonal array where all ... Read More

Construct a DataFrame in Pandas using string data in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 27-Aug-2020 14:11:58

682 Views

Here we will see how we can construct a pandas dataframe using string type data. Pandas supports csv files, but we can do the same using string also. For string type data, we have to use one wrapper, that helps to simulate as the data is taken as csv reader.Here ... Read More

Construct a Binary Tree from Postorder and Inorder in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 27-Aug-2020 14:07:33

703 Views

Suppose we have the inorder and postorder traversal sequence of a binary tree. We have to generate the tree from these sequences. So if the postorder and inorder sequences are [9, 15, 7, 20, 3] and [9, 3, 15, 20, 7], then the tree will be −Let us see the ... Read More

Construct a Binary Search Tree from given postorder in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 27-Aug-2020 14:04:34

348 Views

Suppose we have the postorder traversal sequence of a binary search tree. We have to generate the tree from these sequences. So, if the postorder sequences is [9, 15, 7, 20, 3], then the tree will be −To form a tree we need inorder traversal also, but for binary search ... Read More

User Defined Literals in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 27-Aug-2020 14:00:41

411 Views

Here we will see the concept of the user-defined literals in C++. From C++ version 11, the User Defined Literals (UDL) are added in C++. C++ also provides literals for a variety of built-in types but these are limited.Built-in Literals −31 (Integer)3.5 (Double)4.2F (Float)'p' (Character)31ULL (Unsigned Long Long)0xD0 (Unsigned Hexadecimal ... Read More

Uniform Initialization in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 27-Aug-2020 13:55:32

2K+ Views

Here we will discuss about the uniform initialization in C++. This is supported from C++11 version. The uniform initialization is a feature that permits the usage of a consistent syntax to initialize variables and objects which are ranging from primitive type to aggregates. In other words, it introduces brace-initialization that ... Read More

Fill 8 numbers in grid with given conditions in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 27-Aug-2020 13:53:49

204 Views

Suppose we want to place 1, 2, 3, 4, 5, 6, 7, 8, into the eight circles in the given figure, in this way that no number is adjacent to a number that is next to it in the sequence.So, if the input is like0-1-10-1-1-1-10-1-10then the output will beTo solve ... Read More

Heap in C++ STL - make_heap(), push_heap(), pop_heap(), sort_heap(), is_heap, is_heap_until()

Arnab Chakraborty

Arnab Chakraborty

Updated on 27-Aug-2020 13:49:11

2K+ Views

In this section we will see the heap data structure present in C++ STL. This permits faster input into heap and retrieval of a number always results in the largest number i.e. largest number of the remaining numbers is popped out each time. Other elements of the heap are arranged ... Read More

Geometry using Complex Numbers in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 27-Aug-2020 13:46:10

362 Views

In this section, we will see how to make point class using complex class from STL in C++. And apply them on some geometry related problems. The complex number is present inside the complex class from STL (#include )Defining Point ClassTo make complex to point, we will change the name ... Read More

Generating Test Cases (generate() and generate_n() in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 27-Aug-2020 13:43:39

350 Views

In this section we will see how we can use C++ STL function to generate test cases. Sometimes generating test cases for array programs can be very complicated and inefficient process. C++ provides two methods to generate test cases. These methods are as follows −The generate() methodThe C++ function std::algorithm::generate() ... Read More

Advertisements