Given an input string (s) and a pattern (p), implement regular expression matching with support for ‘.’ and ‘*’. ‘.’ Matches any single character. ‘*’ Matches zero or more of the preceding element. The matching should cover the entire input string (not partial). Note: s could be empty and contains only lowercase letters a-z. p could be emptyContinue Reading

The decorator pattern allows behavior to be added to an individual object. Example c#   public abstract class BaseSalad { protected double myPrice; public virtual double GetPrice() { return this.myPrice; } } public abstract class ExtrasDecorator : BaseSalad { protected BaseSalad salad; public ExtrasDecorator(BaseSalad saladToDecorate) { this.salad = saladToDecorate; }Continue Reading