In Object-Oriented Programming paradigm, classes can be derived from other classes, hence inheriting fields and methods from those classes.
Java, C++, Python, Scala, etc. are some of the programming languages that exhibit the property of inheritance.
The idea of inheritance is very simple yet powerful. There can be times when we want to create a new class and there is already an existing class that includes some of the code we might be in need, so in that case we can derive our new class from the existing class. …
Given a list of numbers and a number
k, return whether any two numbers from the list add up to
For example, given
[10, 15, 3, 7] and
17, return [0, 3] since
10 + 7 is
17. Otherwise, return [-1, -1].
Bonus: Can you do this in one pass?
Similar Leetcode problem: https://leetcode.com/problems/two-sum/
Approach 1: Brute Force Method
Let’s try this to approach the problem gradually, and try this with a 2-pass approach.
(Programming Language Used: Python)
def twoSum(nums, target): res = 
for i in range(len(nums))…
Or should we call secret recipes to logical programming?
Choice is yours!
The world that we are living in is being increasingly powered by various software. We can hardly find anything being done without the use of software. Seriously, it just touches almost every aspect of our daily lives; whether keeping ourselves updated by scrolling through the news feeds, or doing office-work on spreadsheets or preparing presentations or coding, or driving in our cars or even using some smart kitchen appliances for our ease. And, have you ever wondered what powers a software? Of course, they are Algorithms.
This article has been written to enter SaturnCloud’s V-day challenge. (www.saturncloud.io)
It was few months ago when me and my teammates where doing some brainstorming about a Data Visualizing project that we had to do as a part of our Masters program course curriculum. Initially we didn’t have any concrete idea on what to do. And as usual with any other group, we bounced a lot of ideas around, some were good and some not so. Ultimately, with a few rounds of discussion and consulting with our professor, we came up with an awesome idea.
So, what was the awesome…
It was about a month ago when I paid a short visit to my hometown (Kolkata, India) and I was full of mixed feelings — excited because I was going to meet my family members after a long time, doleful as I was traveling alone, leaving my husband & my daughter here in USA and anxious because I was going to attend the visa interview(Student visa for pursuing my Master’s degree) at the US Consulate — the main purpose of my visit to my hometown. With all the mixed feelings going in my mind, I sometimes, became nervous too, with…
I was playing around with data and then I found the Science — Yes, my introduction to the world of Data Science has been a part of my research work that I did solely for my pleasure. I used to work as a Database Developer in a reputed IT firm when my daughter was born and I decided to take a hiatus from work to make her my priority. However, whenever I was at leisure, I was always surfing the web, poking around in my friend circle to keep updating myself with the latest technologies and all the happenstance in…
In today’s world, every business is bombarded with data from each and every angle possible. There always remains a constant pressure to use various insights we garner from the data to improvise on our business performance. Hence, the incredible amount of the usage of the processed data has surged the desire and demand for data-democratization. So, if you are wondering that the above mentioned term is totally new to you, let’s dive deep into it.
Before grabbing some knowledge on data democratization, we need to understand what does democratization mean. We can define it as the introduction of a democratic…
In recent times, almost all the business leaders would like the ubiquitous use of data throughout their organizations. While the companies try to put in a lot of effort in gathering the data across their business, often it happens that the data was unable to cross the periphery and remained mostly as an untapped potential. So, wanna know the success behind the data-savvy tech-giants like Facebook, Amazon, Twitter, Google, etc. and compare with other organizations who are still struggling to make a similar pathway? — Probably it is the ability to establish and cultivate data-driven culture across their business. …