Nishtha Thakur has Published 568 Articles

C++ Program to Implement Interval Tree

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

595 Views

An interval tree is an ordered tree data structure to hold intervals. It specifically allows one to efficiently find all intervals that overlap with any given interval or point. Here is a C++ Program to implement an interval tree.AlgorithmBegin    function insert() is used to insert new nodes into the ... Read More

How to initialize private static members in C++?

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

18K+ Views

Here we will see how to initialize the private static member variables initialization in C++. We can put static members (Functions or Variables) in C++ classes. For the static variables, we have to initialize them after defining the class.To initialize we have to use the class name then scope resolution ... Read More

Collectors counting() method in Java 8

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

1K+ Views

The counting() method of the Java 8 Collectors class returns a Collector accepting elements of type T that counts the number of input elements.The syntax is as follows −static Collector counting()Here, the parameter −T − type of input elementsLong − This class value of the primitive type long in ... Read More

Dynamic_cast and static_cast in C++

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

2K+ Views

static_cast: This is used for the normal/ordinary type conversion. This is also the cast responsible for implicit type coersion and can also be called explicitly. You should use it in cases like converting float to int, char to int, etc. This can cast related type classes. If the types are ... Read More

Escape sequences in C

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

2K+ Views

Many programming languages support a concept called Escape Sequence. When a character is preceded by a backslash (\), it is called an escape sequence and it has a special meaning to the compiler. For example, in the following statement is a valid character and it is called a new ... Read More

What is converting constructor in C++ ?

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

98 Views

In this section we will see what is the conversion constructor or converting constructor in C++ class. A constructor is a special type of function of class. It has some unique property like, its name will be same as class name, it will not return any value etc. The constructors ... Read More

MongoDB Increment value inside nested array?

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

542 Views

You can use positional operator $ for this. To understand the above concept, let us create a collection with the document. The query to create a collection with a document is as follows −> db.incrementValueInNestedArrayDemo.insertOne(    ... {"UniqueId":1,       ... "StudentDetails":       ... [     ... Read More

Scansets in C

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

2K+ Views

Let us see, what is the scanset in C. The scanset is basically a specifier supported by scanf family functions. It is represented by %[]. Inside scanset we can specify only one character or a set of characters (Case Sensitive). When the scanset is processed, the scanf() can process only ... Read More

How to use blob data type in Android sqlite?

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

940 Views

Before getting into example, we should know what sqlite data base in android is. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. SQLite supports all the relational database features. In order to ... Read More

Write a C macro PRINT(x) which prints x

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

1K+ Views

Here we will see how to define a macro called PRINT(x), and this will print whatever the value of x, passed as an argument.To solve this problem, we will use the stringize operator. Using this operator the x is converted into string, then by calling the printf() function internally, the ... Read More

Advertisements