Tutorialspoint.dev
Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
Pattern Searching Pattern Searching

Optimized Naive Algorithm for Pattern Searching

Question: We have discussed Naive String matching algorithm here. Consider a situation where all characters of pattern are different. Can we modify the original Naive...
Pattern Searching Modular Arithmetic Modular Arithmetic

Rabin-Karp Algorithm for Pattern Searching

Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] in txt[]. You may assume tha...
C++ Design Pattern Linked List

Implementing Iterator pattern of a single Linked List

STL is one of the pillars of C++. It makes life lot easier, especially when your focus is on problem solving and you don’t want to spend time in implementing s...
C++ Design Pattern CPP

Composite Design Pattern in C++

Prerequisite : Composite Design Pattern Composite pattern is one of the most widely used patterns in the industry and addresses a very significant and subtle problem....
C++ School Programming pattern-printing

Programs for printing pyramid patterns in C++

This article is aimed at giving a C++ implementation for pattern printing. Simple pyramid pattern // C++ code to demonstrate star pattern #include <iostr...
CSS HTML Web Technologies

HTML pattern Attribute

This attribute is used to specify the regular expression on which the input elements value is checked against. This attribute works with the following input types: te...
PHP School Programming pattern-printing

PHP programs for printing pyramid patterns

This article is aimed at giving a PHP implementation for pattern printing. Simple Pyramid Pattern <?php // Php code to demonstrate // star pattern &#xA...
Python School Programming pattern-printing

Programs for printing pyramid patterns in Python

Patterns can be printed in python using simple for loops. First outer loop is used to handle number of rows and Inner nested loop is used to handle the number of col...
Python Python-Library python-regex

fnmatch – Unix filename pattern matching in Python

This module is used for matching Unix shell-style wildcards. fnmatch() compares a single file name against a pattern and returns TRUE if they match else returns FALSE...
Python Python numpy-program Python-numpy

Python program to print checkerboard pattern of nxn using numpy

Given n, print the checkboard pattern for a n x n matrix Checkboard Pattern for n = 8: It consists of n * n squares of alternating 0 for white and 1 for black. ...

Subscribe to Our Newsletter