First declare the main text text="abcd" #this is main text Noe declare the pattern you want to search in the main text patt="cd" #this is pattern to search for in the main text Now find the difference in length of main text and … [Continue reading] about Find pattern in a String using Python
Understanding Azure function
azure function is a way to implement serverless computing in azure.This means that the developer is not concerned about things such as managing infrastrcuture,scalling and deployment.Instead developer can focus on business logic. Function is … [Continue reading] about Understanding Azure function
Run ASP.NET Core application in a docker container
Containers are similar to virtual machines.But they have the following advantages when compared to virtual machines:- They are lightweight since all the containers share the same OS. They have faster start up time. Docker is one of the … [Continue reading] about Run ASP.NET Core application in a docker container
Finding substring in a string
Following program finds a substring in a string. public static int Find(string text, string pattern) { // ASHI COMPARE A,S,H,I // SHI A==S,S==H for (int i = 0; i <=text.Length - pattern.Length; i++) { int temp = i; for (int j = 0; j < … [Continue reading] about Finding substring in a string
Program to check valid parenthesis
Program to check valid parenthesis public class Solution { public bool IsValid(string s) { Stack stack=new Stack(); foreach(char ch in s) { if(ch=='(' || ch=='{' || ch=='[') stack.Push(ch); if(ch==')' || ch=='}' || … [Continue reading] about Program to check valid parenthesis