A Knowledge Base

This blog site is dedicated for articles on problem solving using C, C++, data structures, algorithms. Besides this few technical articles are also presented.

Mar 7, 2022

Substring in a given string

#include #include using namespace std; int substrpos(char s[], char t[]) { if(( (!s) || (!t) || strlen(s) < strlen(t)) ) return -1; for(int i=0; i<(strlen(s)-strlen(t))+1; i++) { int j=0; for(;j
Posted by Swetank at 11:12 PM

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Total Pageviews

Search This Blog

Blog Archive

  • ▼  2022 (30)
    • ►  May (1)
      • ►  25 May (1)
    • ►  April (3)
      • ►  08 Apr (1)
      • ►  07 Apr (1)
      • ►  03 Apr (1)
    • ▼  March (26)
      • ►  19 Mar (2)
      • ►  18 Mar (1)
      • ►  17 Mar (2)
      • ►  16 Mar (2)
      • ►  15 Mar (1)
      • ►  12 Mar (2)
      • ►  10 Mar (1)
      • ►  09 Mar (1)
      • ►  08 Mar (3)
      • ▼  07 Mar (8)
        • Find maximum average subarray of k length
        • Substring in a given string
        • Segregate 0s and 1s in an array
        • Sort an array of 0s, 1s and 2s
        • Count all distinct pairs with difference equal to k
        • sort an array using quicksort
        • Minimum length unsorted array
        • Maximum sum sub matrix
      • ►  04 Mar (1)
      • ►  02 Mar (1)
      • ►  01 Mar (1)
  • ►  2017 (10)
    • ►  June (10)
      • ►  26 Jun (2)
      • ►  25 Jun (4)
      • ►  24 Jun (1)
      • ►  23 Jun (1)
      • ►  07 Jun (1)
      • ►  02 Jun (1)
  • ►  2016 (1)
    • ►  July (1)
      • ►  12 Jul (1)
  • ►  2011 (31)
    • ►  May (1)
      • ►  04 May (1)
    • ►  April (29)
      • ►  20 Apr (11)
      • ►  19 Apr (18)
    • ►  February (1)
      • ►  11 Feb (1)

About Me

Swetank
View my complete profile

My Blog List

  • Curiosity of Technology
    Few Strategy Mistakes Companies Make
    12 years ago

Labels

TRIE (1) algorithm (19) array (5) data structure (16) dictionary (1) heapsort (1) inorder (1) kth smallest (1) linked list (3) matrix (1) maximum length of spaces (1) maximum sum sub array (1) mergesort (1) pattern search (3) quicksort (2) random numbers (1) remove duplicates (1) searching (1) sorted insert (1) spiral print (1) string (3) substring (1) traversal (1) word search (1)
Simple theme. Powered by Blogger.