Samual Sam has Published 2310 Articles

Introduction to Searching Algorithms

Samual Sam

Samual Sam

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

9K+ Views

The searching algorithms are used to search or find one or more than one element from a dataset. These type of algorithms are used to find elements from a specific data structures. Searching may be sequential or not. If the data in the dataset are random, then we need to ... Read More

Java Program to concatenate a String and Integers

Samual Sam

Samual Sam

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

9K+ Views

To concatenate a String and some integer values, you need to use the + operator. Let’s say the following is the string. String str = "Demo Text"; Now, we will concatenate integer values. String res = str + 1 + 2 + 3 + 4 + 5; ... Read More

Intersection of two arrays in Java

Samual Sam

Samual Sam

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

2K+ Views

The intersection of the two arrays results in those elements that are contained in both of them. If an element is only in one of the arrays, it is not available in the intersection. An example of this is given as follows − Array 1 = 1 2 ... Read More

Introduction to Graph Algorithms

Samual Sam

Samual Sam

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

673 Views

The graph is a non-linear data-structure, which consists finite number of nodes and a set of edges which are used to connect a pair of nodes. The graphs are used to solve some real-time problems to represent network etc. In different social networks, the graphs are used. In this Section ... Read More

Compare Two Java long Arrays

Samual Sam

Samual Sam

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

539 Views

To compare two Java long arrays in Java, use Arrays.equals() method. Let’s say we have the following long arrays. long[] arr1 = new long[] { 767, 568, 555, 897, 678 }; long[] arr2 = new long[] { 456, 756, 555, 999, 678}; long[] arr3 = new long[] { 767, ... Read More

Hexadecimal integer literal in Java

Samual Sam

Samual Sam

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

7K+ Views

For Hexadecimal, the 0x or 0X is to be placed in the beginning of a number. Note − Digits 10 to 15 are represented by a to f (A to F) in Hexadecimal Here are some of the examples of hexadecimal integer literal declared and initialized as int. int ... Read More

Reading and Writing to text files in Python

Samual Sam

Samual Sam

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

2K+ Views

Like other languages, Python provides some inbuilt functions for reading, writing, or accessing files. Python can handle mainly two types of files. The normal text file and the binary files. For the text files, each lines are terminated with a special character '' (It is known as EOL or ... Read More

Precision Handling in Python

Samual Sam

Samual Sam

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

3K+ Views

Python can handle the precision of floating point numbers using different functions. Most functions for precision handling are defined in the math module. So to use them, at first we have to import the math module, into the current namespace. import math Now we will see some of ... Read More

Define integer literals as octal values in Java

Samual Sam

Samual Sam

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

4K+ Views

Literals with a leading zero are octal literals. Any number prefixed with a 0 is considered octal. Octal numbers can only use digits 0-7, just like decimal can use 0-9, and binary can use 0-1. To define integer literals as octal value in Java is effortless. Here is the declaration ... Read More

Telephone Modems

Samual Sam

Samual Sam

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

2K+ Views

Modem is an abbreviation of “modulator demodulator”. It is a network device that modulates digital information or bits into analog signals for transmission at the sending end, and demodulates the analog signals to bits at the receiving end. Telephone modems enables data communication between two computers over voice – grade ... Read More

Advertisements