Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles on Trending Technologies
Technical articles with clear explanations and examples
Life after 31st march 2017 for jio subscribers jio prime
With the commercial launch of Reliance Jio services on September 5, 2016, the telecom operator introduced ‘Welcome Offer’ with free voice and data (with a cap of 4GB data per day) services on the Jio SIM up to December 31, 2016. The company extended the ‘Welcome Offer’ by another three months till March 31, 2017 by relaunching it as the ‘Happy New Year Offer.’Welcome Offer’ also offered free voice calls, video calling, messaging and data, but with a data limit of 1GB per day. Reliance Jio claimed to be the fastest growing technology company in the world, and had close ...
Read Morewhat will be the role of driver in the car with auto driving mode on
Today, the time has been changed with the touch of automation technology which is developing enormously every now and then. Each new era of automobile is getting furnished with more mechanized components and crash averting technology. They are getting integrated with advanced options, such as blind-spot observing, forward-crash warnings, lane-departure warnings etc. Another such feature is auto-driving mode.Commonly, many have some misconception between ‘autonomous or automated driving’ and ‘self driving’. These terms are fundamentally different from each other. When it comes to the construction of auto-driving mode activated cars, they are similar to normal ones and can ready to assume ...
Read MoreFind minimum and maximum elements in singly Circular Linked List in C++
Here we will see how to get the minimum and maximum value from one singly circular linked linear list. The basic concept is very simple. The next part of the last node will be pointed to the first node, the first node will also be pointed using start pointer. When we insert some element into the list, after inserting the next part of the newly inserted node will be updated with the address of the start node.Initially the min is assigned with positive infinity, and max is assigned with negative infinity. Now traverse the list from left to right. If ...
Read MoreCheck if a number is multiple of 5 without using / and % operators in C++
Here we will see how to check a number is divisible by 5 or not. One simple approach is that if the number mod 5 = 0, then, the number is divisible by 5. But here we will not use / or % operator. To check whether a number is divisible by 5, we have to see the last number is 0 or 5. If that is 0 or 5, the number is divisible by 5, otherwise not. Here we can use some large numbers also as a string to check.Example#include using namespace std; bool isDiv5(string num){ int ...
Read MoreCheck given array of size n can represent BST of n levels or not in C++
We have an array A, we have to check whether the array can represent a BST with n levels or not. As the level is , we can construct a tree in following manner. Assume a number is k, value greater than k moves to right side, and less than k moves to left side. Suppose two lists are there: {50, 20, 9, 25, 10}, and {50, 30, 20, 25, 10}The first one is not valid, but the second one is valid.To check this we can either create a BST and check the height, otherwise use array based approach. The ...
Read MoreCheck for Identical BSTs without building the trees in C++
We have two arrays to represent the elements of the BST. If we take elements from that array from left to right, and form the BST, then by taking from both the arrays, we will make the same BST. We have to check whether both are forming the same or not. But the constraint is we cannot make the BST. Suppose two arrays are {2, 4, 1, 3}, and {2, 1, 4, 3}, then if we see, both of these sequences can form same BST.The approach is simple. As we know, the elements of left subtree are smaller than root ...
Read MoreCheck for Children Sum Property in a Binary Tree in C++
Suppose we have a binary tree. The binary tree is valid when it meets the following property.Each node should contain data value same as the sum of left and right children values. If there are no children at any side, then it will be treated as 0.Suppose a tree is present like below, which meets the given property.There is no such trick to check this, we have to traverse the tree recursively, if the node and both of its children satisfies the property then return true, otherwise false.Example#include using namespace std; class node { public: int data; ...
Read MoreFinding a Non Transitive Coprime Triplet in a Range in C++
Suppose we have the lower and upper bound, and we have to find nontransitive triplet (x, y, z), such that the pair (x, y) are coprime (GCD is 1), the pair (y, z) are coprime, but pair (x, z) is not a coprime pair. For example, if the lower bound is 2, and upper bound is 10, then the elements are {2, 3, 4, 5, 6, 7, 8, 9, 10}, here possible triplet is (4, 7, 8), here (4, 7), and (7, 8) are coprime, but (4, 8) is not a coprime pair.We will follow the naïve approach to solve ...
Read MoreMinimize ASCII values sum after removing all occurrences of one character in C++
Suppose we have a string. We have to minimize the sum of ASCII values, of each character to the string, after removing every occurrence of a particular character. Suppose a string is given like “hello” the sum of ASCII characters is (104 + 101 + 108 + 108 + 111) = 532. Now check occurrences of each characters.h has occurred one time, so cost is 1 * 104 = 104e has occurred one time, so cost is 1 * 101 = 101l has occurred one time, so cost is 2 * 108 = 216o has occurred one time, so cost ...
Read MoreMaximum Possible Edge Disjoint Spanning Tree From a Complete Graph in C++
Suppose we have a complete graph; we have to count number of Edge Disjoint Spanning trees. The Edge Disjoint Spanning trees are spanning trees, where no two trees in the set have an edge in common. Suppose the N (number of vertices) is 4, then output will be 2. The complete graph using 4 vertices is like below −Two edge disjoint spanning trees are like −The maximum number of edge disjoint spanning tree from a complete graph, with N vertices will be $[\frac{n}{2}]$Example#include #include using namespace std; int maxEdgeDisjointSpanningTree(int n){ return floor(n/2); } int main() { int n = 4; cout
Read More