Sign in

Tech Enthusiast | Undergraduate | Blogger
Photo by Kai Wenzel on Unsplash

In this article, I will discuss how to complete an essential integration with Google Sign-In with Node JS and Passport JS.

Initializing a NodeJS Project

To begin with, let’s create an Express Application. Create a new…

Photo by Jeremy Bishop on Unsplash

What is Dynamic Programming?

In this article, I am going to discuss solving knapsack problems using dynamic programming. Dynamic Programming is a method for solving some types of problems in polynomial time.

Dynamic Programming solutions are faster than the exponential brute process such as recursion, and their correctness can be easily demonstrated. Before we can learn how to think dynamically about a problem, we must first understand:

  1. Overlapping Subproblems
  2. Optimal Substructure Property

If you are not familiar…

Browsers can store key-value pairs in a better way than using cookies.

Photo by Andrew Neel on Unsplash

In this article, I am going to discuss HTML web storage that is used in Web browsers. Let’s dive into the explanation.

What are cookies?


Browser cookies are identified and read by “key-value” pairs. These tell cookies where to be sent and what data to recall. Cookies are stored in web browsers that contain users’ information, and they can store the user’s browsing activity, such as user’s details that entered through form fields and payment information.

There are two types of cookies that are more important.

• Persistence cookie

This cookie…

Understanding the greedy algorithm

Photo by Red Zeppelin on Unsplash

Let’s think of an array of stick-lengths, find which three sticks form a non-degenerate triangle such that:

  • the triangle has a maximum perimeter
  • if there are two or more combinations with the same value of maximum perimeter, output the one with the longest side.
  • Output -1 if not possible

Are you confused about the non-degenerate triangle?

If a, b and c are the sides of the triangle, and if the following 3 conditions are true, then it is a non-degenerate triangle.

Basics of Model-View-Controller Architecture

Photo by Paul Skorupskas on Unsplash

What is MVC architecture?

The Model-View-Controller (MVC) is an architectural pattern that separates an application into three main logical components: the model, the view, and the controller. Each of these components is built to handle specific development aspects of an application. MVC is one of the most frequently used industry-standard web development frameworks to create scalable and extensible projects.

Photo by Derzulya Zaza on Unsplash

The above feature makes it a LIFO (Last-In-First-Out) data structure. Here, the element which is inserted last is accessed first. In stack…

Photo by Denis Cherkashin on Unsplash

In this article, I am going to discuss the most useful Widgets that we need when we are going to develop a flutter application.

  1. AppBar class
  2. Scaffold class
  3. Container class

1. AppBar class

AppBar is usually the topmost component of the app (or sometimes the bottom-most), it contains the toolbar and some other common action buttons. All the components in a flutter application is a widget or a combination of…

One of the main reasons to use threads in Java is to make a task run parallel to another task.

Photo by Alex Palmer on Unsplash

Why we use Threads in Java?

We use Threads to make Java applications faster by doing multiple things at the same time. In technical terms, Thread helps us to achieve parallelism in Java programs. Since the CPU is high-speed and it even contains multiple cores, just one Thread cannot take advantage of all the cores. This means our costly hardware will remain idle for most of the time.

Using multiple threads, we can take full advantage of multiple cores by serving more clients and serving them…

The Map interface is not a subtype of the Collection Interface. Therefore it behaves a bit differently from the rest of the collection types.

Photo by Dariusz Sankowski on Unsplash

In my previous article, we discussed Java lists, queues, and sets in the Java Collection Interface. If you are not familiar with lists, queues, and sets. Let’s dive into Java Map Interface.

What is the Java Map Interface?

The Map interface is present in java.util package and represents a mapping between a key and a value. The Map interface is not a subtype of the Collection Interface. Therefore it behaves a bit differently from the rest of the collection types.

A Map…

Architecture for storing and manipulating a group of objects

Photo by Leora Dowling on Unsplash

What is meant by the collection framework?

The Collection in Java is a framework that provides an architecture to store and manipulate the group of objects.

Java Collections can achieve all the operations we perform on data, such as searching, sorting, insertion, manipulation, and deletion.

Java Collection means a single unit of objects. Java Collection framework provides many interfaces (List, Set, Queue, Deque) and classes (ArrayList, Vector, LinkedList, PriorityQueue, HashSet, LinkedHashSet, TreeSet).

Hierarchy of Collection Framework

The java.util package contains all the classes and interfaces for the Collection framework.

Pulsara Sandeepa

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store