Maximum Consecutive Zeroes in Concatenated Binary String in C++

Arnab Chakraborty
Published on 17-Oct-2019 17:08:57
Suppose we have a binary string of length n, another value say k is given. We have to concatenate the binary string k times. Then we have to find the maximum number of consecutive 0s in the concatenated string. Suppose binary string is “0010010”, and k = 2, then after ... Read More

Split the array into equal sum parts according to given conditions in C++

Arnab Chakraborty
Published on 17-Oct-2019 17:04:46
Here we will see one problem. Suppose one array arr is given. We have to check whether the array can be split into two parts, such that −Sub of both sub-arrays will be the sameAll elements, which are multiple of 5, will be in the same groupAll elements which are ... Read More

How to run Python code on Google Colaboratory?

Pradeep Elance
Published on 17-Oct-2019 16:53:59
Google Colaboratory is a free Jupyter notebook environment that requires no setup and runs entirely in the cloud. It is hosted in google cloud and maintained by Google for the benefit of python coders who want to run and test python scripts using a cloud environment. In this article, we ... Read More

How to implement Dictionary with Python3

Pradeep Elance
Published on 17-Oct-2019 16:44:56
Dictionaries in python are a type of data structure that map keys to values as a key-value pair. They are one of the frequently used data structures and have many interesting properties. They are presented by enclosing them in a pair of curly brace like below.dict = {'day1':'Mon' ,'day2':'Tue', 'day3':'Wed'}The ... Read More

What is Heap queue (or heapq) in Python?

Pradeep Elance
Published on 17-Oct-2019 16:42:58
Heap queue is a special tree structure in which each parent node is less than or equal to its child node.In pythin it is implemented using the heapq module. It is very useful is implementing priority queues where the queue item with higher weightage is given more priority in processing. ... Read More

Guide to Install MongoDB with Python in Windows

Pradeep Elance
Published on 17-Oct-2019 16:37:17
Get MongoDBTo install MongoDB on Windows, first, download the latest release of MongoDB from https://www.mongodb.org/downloads. Below is an example of selecting a 64-bit version for windows as a msi installer.Install MongoDBNext, we follow the below steps to install MongoDB. As it is a windows installation using the msi installer, the ... Read More

How to ignore a class during the serialization using Jackson in Java?

raja
Published on 17-Oct-2019 16:33:44
The Jackson @JsonIgnoreType annotation can be used to ignore a class during the serialization process and it can mark all the properties or fields of a class to be ignored while serializing and deserializing a JSON object.Syntax@Target(value={ANNOTATION_TYPE, TYPE}) @Retention(value=RUNTIME) public @interface JsonIgnoreTypeExampleimport com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.databind.*; import java.io.*; public class JsonIgnoreTypeTest {    public static ... Read More

Graph Plotting in Python

Pradeep Elance
Published on 17-Oct-2019 16:31:22
Python has the ability to create graphs by using the matplotlib library. It has numerous packages and functions which generate a wide variety of graphs and plots. It is also very simple to use. It along with numpy and other python built-in functions achieves the goal. In this article we ... Read More

Global keyword in Python

Pradeep Elance
Published on 17-Oct-2019 16:26:49
Different variables in a python program have different scope. Depending on where it is declared, the variable may or may not be accessible inside a function. Sometimes we will need to modify a variable that is present inside a function from outside its current scope. In such a scenario we ... Read More

getpass() and getuser() in Python (Password without echo)

Pradeep Elance
Published on 17-Oct-2019 16:22:01
When you create some python programs that need password protection before it can run, we take the help of the getpass() and getuser() modules. They have a variety of functionalities that can be used to manage password protection as well as password retrieval etc. In this article, we will see ... Read More
1 2 3 4 5 6 7 ... 2660 Next
Advertisements