Jennifer Nicholas has Published 331 Articles

C++ Program to find the maximum subarray sum O(n^2) time (naive method)

Jennifer Nicholas

Jennifer Nicholas

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

248 Views

We shall develop a C++ program to find the maximum subarray sum O(n^2) time (naive method).AlgorithmBegin    Take the array elements as input.    Make a loop for the length of the sub-array from 1 to n, within this loop,    Make another loop nested with the previous one, calculate ... Read More

C++ Program to Implement Sorted Doubly Linked List

Jennifer Nicholas

Jennifer Nicholas

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

1K+ Views

In data structure Link List is a linear collection of data elements. Each element or node of a list is comprising of two items - the data and a reference to the next node. The last node has a reference to null. Into a linked list the entry point is ... Read More

How to add check box list in alert dialog?

Jennifer Nicholas

Jennifer Nicholas

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

2K+ Views

How to add checkbox list in alert dialog?This example demonstrates How to add checkbox list in the alert dialogStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code ... Read More

Default arguments and virtual function in C++

Jennifer Nicholas

Jennifer Nicholas

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

202 Views

Let’s consider a sample program in C++ for easy under standing of the concept −Example Code#include using namespace std; class B {    public:       virtual void s(int a = 0) {          cout

Virtual Constructor in C++

Jennifer Nicholas

Jennifer Nicholas

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

17K+ Views

The virtual mechanism works only when we have a base class pointer to a derived class object.In C++, the constructor cannot be virtual, because when a constructor of a class is executed there is no virtual table in the memory, means no virtual pointer defined yet. So, the constructor should ... Read More

How to get phone number in android?

Jennifer Nicholas

Jennifer Nicholas

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

4K+ Views

This example demonstrate about How to get phone number in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     In the ... Read More

Deploying Scrapy spider on ScrapingHub

Jennifer Nicholas

Jennifer Nicholas

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

133 Views

Scrapy spiderScrapy spider is a class which provides the facility to follow the links of a website and extract the information from the webpages.This is the main class from which other spiders must inherit.ScrapinghubScrapinghub is an open source application to run Scrapy spiders. Scrapinghub turns web content into some useful ... Read More

Android Determine App Starts First Time OR Not Programmatically?

Jennifer Nicholas

Jennifer Nicholas

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

1K+ Views

This example demonstrates about Android Determine App Starts First Time OR Not Programmatically.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. ... Read More

How to add radio button list in alert dialog?

Jennifer Nicholas

Jennifer Nicholas

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

3K+ Views

This example demonstrate about how to add radio button list in alert dialogStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     In ... Read More

Remove Trailing Zeros from string in C++

Jennifer Nicholas

Jennifer Nicholas

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

3K+ Views

IN this program we will see how to remove the trailing zeros from a string in C++. Sometimes some string may contain trailing zeros like "00023054". After executing this program, it will return "23054" only. The initial zeros are removed.Input: A string with trailing zeros “000023500124” Output: “23500124”AlgorithmStep 1: Get ... Read More

Advertisements