Anvi Jain has Published 569 Articles

C++ Program to Find Strongly Connected Components in Graphs

Anvi Jain

Anvi Jain

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

688 Views

Weakly or Strongly Connected for a given a directed graph can be found out using DFS. This is a C++ program of this problem.Functions usedBegin Function fillorder() = fill stack with all the vertices.    a) Mark the current node as visited and print it    b) Recur for all ... Read More

IntStream filter() method in Java

Anvi Jain

Anvi Jain

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

599 Views

The filter() method of the IntStream class in Java returns a stream consisting of the elements of this stream that match the given predicate.The syntax is as follows −IntStream filter(IntPredicate predicate)Here, the predicate parameter is a stateless predicate to apply to each element to determine if it should be included. ... Read More

C++ Program to Find the Vertex Connectivity of a Graph

Anvi Jain

Anvi Jain

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

727 Views

To find the Vertex Connectivity of a graph we need to find out Articulation Points of that graph. Articulation Points (or Cut Vertices) in a Graph is a point iff removing it (and edges through it) disconnects the graph. An articulation point for a disconnected undirected graph, is a vertex ... Read More

C++ Program to Implement the Solovay-Strassen Primality Test to Check if a Given Number is Prime

Anvi Jain

Anvi Jain

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

328 Views

Solovay-Strassen Primality Test is used to test a number whether it is a composite or possibly prime number.AlgorithmsBegin    Declare a function modulo to the long datatype to perform binary calculation.       Declare m_base, m_exp, m_mod of long datatype and pass them as a parameter.       ... Read More

How to convert date and time into int in Android sqlite?

Anvi Jain

Anvi Jain

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

283 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

DoubleStream allMatch() method in Java

Anvi Jain

Anvi Jain

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

123 Views

The allMatch() method in the DoubleStream class returns whether all elements of this stream match the provided predicate.The syntax is as follows −boolean allMatch(DoublePredicate predicate)Here, the argument predicate is a stateless predicate to apply to elements of this stream. The DoublePredicate is a predicate of one double-valued argument.To use the ... Read More

Macros and Preprocessors in C

Anvi Jain

Anvi Jain

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

3K+ Views

The C Preprocessor is not a part of the compiler, but is a separate step in the compilation process. In simple terms, a C Preprocessor is just a text substitution tool and it instructs the compiler to do required pre-processing before the actual compilation. We'll refer to the C Preprocessor ... Read More

Meaning of 'const' last in a function declaration of a C++ class?

Anvi Jain

Anvi Jain

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

817 Views

Sometimes we can find the keyword ‘const’ present at the last of function declaration. So what does it mean?Using this one function can be made as constant. The idea of constant function is that, the function cannot be modified from the objects, where they are called. It is recommended to ... Read More

How to print local time in Android sqlite?

Anvi Jain

Anvi Jain

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

162 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

Need of long data type in C

Anvi Jain

Anvi Jain

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

400 Views

In C or C++, there are four different datatypes, that are used for integer type data. These four datatypes are short, int, long and long long. Each of these datatypes takes different memory spaces. The size varies in different architecture and different operating systems. Sometimes int takes 4-bytes or sometimes ... Read More

Advertisements