Articles on Trending Technologies

Technical articles with clear explanations and examples

Print all the duplicates in the input string in C++

sudhir sharma
sudhir sharma
Updated on 17-Jan-2020 524 Views

In this problem, we are given a string and we have to find all the characters that are duplicated along with their number of occurrences in the string.Let’s take an example to understand the problem −Input: TutorialsPoint Output: t (3) o (2) i (2)Explanation− The frequencies of occurrence of each character are t → 3; u → 1; o → 2; r → 1; i → 2; a → 1; s → 1; n → 1.Now, to solve this problem we will find the character count and store it in an array from the string. And then print the characters ...

Read More

The Best Linux based OS Distributions in 2016

karthikeya Boyini
karthikeya Boyini
Updated on 17-Jan-2020 536 Views

This article helps you to know some key features of Linux Operating systems so that you are able to choose Linux for your environment. The year 2015 and the current 2016 will be a crucial year for Linux especially in the enterprise-level segment and consumer/home users. As a Linux user since 1996, I can see that the operating systems have come a long way since 20 years. We can definitely expect more exciting times with new flavors this year.Free/Open Source Server Based OS ‘Debian/CentOS’If you are looking at running a server, but needed a free or open source server version ...

Read More

How much should be a JavaScript Line Length?

Nitya Raut
Nitya Raut
Updated on 17-Jan-2020 814 Views

Try to keep the length of lines less than 80 characters. This would make the code easier to read. Best practice is to move to next line using break if JavaScript statements aren’t fitting in a single line.In addition, move to next line only after a comma or operator. For example, you can add statement like this, with a break after operator,function display() {    var a = "";    a = a + isNaN(6234) + ": 6234";        a = a + isNaN(-52.1) + ": -52.1";    a = a + isNaN('') + ": ''";    document.getElementById("test").innerHTML = a; }

Read More

Microsoft’s Surface Studio for Creative Professionals

Sharon Christine
Sharon Christine
Updated on 17-Jan-2020 162 Views

Microsoft’s Surface Studio is an elegant and mature all-in-one desktop PC with built-in touch screen specially designed for creative professionals. Microsoft first release was the Microsoft PixelSense formerly called as Microsoft Surface back in 2008. The next release was the Microsoft surface tablet followed by the Surface Book. The latest upgraded release is the Surface Studio.The Studio is a 28-inch sharp, incredibly thin display mounted on a pair of “zero gravity” hinges that allows it to act as a regular monitor or tilt down into a type of drafting table. Without doubts Microsoft studio will be a clear challenge to ...

Read More

Print all the pairs that contains the positive and negative values of an element in C++

sudhir sharma
sudhir sharma
Updated on 17-Jan-2020 250 Views

In this problem, we are given an array of unique integers. And we have to return all pairs of integers(positive and negative integers) that are present in the array.Let’s take an example to understand the problem better −Input: array = {1 , 4 , 7 , -1, 2, 5, -7} Output: -11 -33An easy way to solve the problem is by using two loops and find the positive-negative pairs. But this solution will be a complex one and will have time complexity of the order n2 where n is the size of the array.But, we have to find a more ...

Read More

Print all the paths from root, with a specified sum in Binary tree in C++

sudhir sharma
sudhir sharma
Updated on 17-Jan-2020 227 Views

In this problem, we are given a Binary tree and a sum S. And we have to find the path starting from root to any node of the tree, which gives the sum equal to the given sum.InputSum = 14 Output : path : 4 10 4 3 7To find the solution to this problem, we need to find the preorder traversal of the binary tree. And then find the path that adds up to the given sum.Example Live Demo#include using namespace std; struct Node{    int key;    struct Node *left, *right; }; Node* insertNode(int key){    Node* temp = ...

Read More

Market your Business for Free using Social Media Tools

Sharon Christine
Sharon Christine
Updated on 17-Jan-2020 225 Views

A couple of days ago, I happened to read an article where I encountered this statement-“There is nothing called free lunch.” However, I do have a soul-searching question to all the business owners – Who doesn’t like free marketing tools?Small businesses and low budget startups know the value of every penny they invest. Big brands invest BIG money every month, every hour and probably every minute on marketing. Marketing on Social Networking sites has been gaining traction since the past decade. Well, Facebook and Twitter are age-old names and world is obsessed with these two platforms. However, people are connecting ...

Read More

Print all triplets with given sum in C++

sudhir sharma
sudhir sharma
Updated on 17-Jan-2020 314 Views

In this problem, we are given an array of unique integers and a sum. And we have to find the triplets which can form the same sum.Let's take an example to solve the problem −Input : array = {0 , 2 , -1 , 1, -2} Sum = 1 Output : 1 2 -2 0 2 -1To solve this problem, we will be finding all the triplets that provide the sum. A simple approach will be using three loops and finding the sum of the elements and return the adequate triplet.Example Live Demo#include using namespace std; void Triplets(int arr[], int ...

Read More

Linux Package Management with Aptitude

Sharon Christine
Sharon Christine
Updated on 17-Jan-2020 400 Views

Aptitude is founded by Ncurses for APT front End and debian Bundle Manager, considering the fact that it is text-based and it runs from a terminal or a CLI – command line interface. This article explains about-“Linux Package Management with Aptitude”What is APTapt is a command line package manager and provides commands for searching and managing as well as querying information about packages. It provides the same functionality as the specialized APT tools, like apt-get and apt-cache, but enables options more suitable for interactive use by default.]To get more information about APT, use the following command –$ aptThe sample output ...

Read More

Print all the sum pairs which occur maximum number of times in C++

sudhir sharma
sudhir sharma
Updated on 17-Jan-2020 210 Views

In this problem, we are given an array of n unique integers. And we have to find the sum of two integers of the array which has the maximum frequency. The problem has multiple solutions and you need to find them all.Input : array = { 1, 12, 5, 7, 9, 11} Output : 16 12Explanation − sum 16 and 12 occur two times.5 + 11 = 16 & 7 + 9 = 16 1 + 11 = 12 & 5 + 7 = 12Now to solve this problem, our approach to the problem is checking the occurrence every sum ...

Read More
Showing 51001–51010 of 61,248 articles
Advertisements