Differences between Microservices and Monolithic Architecture

Microservices: Service Startup is fast. Microservices are loosely coupled architecture. Changes done in a single data model does not affect other Microservices. Microservices focuses on products, not projects. Monolithic Architecture: Service startup takes time. Monolithic architecture is mostly tightly coupled. Any changes in the data model affect the entire database. Monolithic put emphasize over the […]

Read More

ASP.NET Core Interview Questions and Answers

1.   What is the ASP.NET Core? ASP.NET Core is a new version of ASP.NET by Microsoft. It is a new open-source and cross-platform framework for building modern cloud based internet connected applications, such as web application, IoT application and mobile backends.  It is faster, configurable, modular, scalable and extensible. It is an open-source web framework […]

Read More

Longest Common Prefix

Write a program to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string ” “. Example 1: Input: [“geeksblood”, “geeks”, “geek”] Output: “geek” Example 2: Input: [“abc”,”xyz”,”pqr”] Output: “” Explanation: There is no common prefix among the input strings. Implementation: class Program { […]

Read More

Balanced Brackets

Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[‘ and ‘]’, determine if the input string is valid. An input string is valid if: Open brackets must be closed by the same type of brackets. Open brackets must be closed in the correct order. Note that an empty string is also considered […]

Read More

Find all permutations of a String

Given a string, find all the permutations of the string. For example: Input String: abc Output: {bca, acb, abc, cba, bac, cab} Program: class Program { /*Function to print permutations of string This function takes three parameters: 1. String 2. Starting index of the string 3. Ending index of the string.*/ private static void permute(String […]

Read More

Best Time to Buy and Sell Stock

Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the stock), design an algorithm to find the maximum profit. Note: you cannot sell a stock […]

Read More

Maximum Subarray

Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Example: Input: [-2,1,-3,4,-1,2,1,-5,4], Output: 6 // C# program to print largest contiguous array sum class Program { static int maxSubArraySum(int[] a) { int size = a.Length; int max_so_far = int.MinValue, max_ending_here = […]

Read More

Anagram

Two strings are said to be anagrams, if one string can be obtained by rearranging the letters of another. Examples: dog, god abac, baac anagram, nagaram silent, listen class Anagram { public static void IsAnagram(string word1, string word2) { bool flag = true; if (word1.Length != word1.Length) { flag = false; } var aFrequency = […]

Read More

Text Translation with Google Translate API in Python

Unless you have been hiding under a rock, you have probably used Google Translate on many occasions in your life. Whenever you try to translate a word or a sentence from a certain language to another, it is the Google Translate API which brings you the desired results in the background. Though you can translate anything by […]

Read More

Array vs Linked List

Arrays and Linked Lists both are linear data structures, but they both have some advantages and disadvantages over each other. One advantage of the linked list is that elements can be added to it indefinitely, while an array will eventually get filled or have to be resized (a costly operation that isn’t always possible). Elements […]

Read More

Top 10 largest Auto Insurance Companies of 2020

In USA the top ten auto insurance companies control approximately 72% of the market.   Do You Know the Top 10 largest Auto Insurance Companies of 2020? When looking at the rankings of the top auto insurance companies in the United States, most of the names are recognizable due to their national television advertising campaigns. […]

Read More

Event Bubbling and Capturing

The DOM has two ways for objects to detect events: from the top down, and from the bottom up. The first method is known as event capture, the second is called event bubbling. Event capturing When you use event capturing | | —————| |—————– | element1 | | | | ———–| |———– | | |element2 \ / […]

Read More

Parametric Insurance

Event organizers have been cancelling and delaying due to fears of COVID-19 spread. Hotels with a new type of parametric insurance launched by Lloyd’s of London last year may fare better than other players in the events industry as corona-virus concerns spread. Other players, such as event organizers, may not fare as well as this […]

Read More

Middleware in ASP.NET Core

Introduction Middleware is software that application assembles into the pipeline to handle requests and responses. Each part chooses whether to pass the request on to the next part in the pipeline, and can do certain actions before and after application invokes the next part in the pipeline. Request delegates usage is to build the request […]

Read More

How to handle 404 error in ASP.NET Core 1.0

In this post, we will see different ways to handle HTTP 404 error in ASP.NET Core 1.0 and MVC. I found 2 ways to handle 404 error. In fact using these solutions you can handle any HTTP status code errors. To handle the error, both the solution are using configure() method of Startup.cs class. For those who are not aware about […]

Read More