Skip to content

SimpleTechTalks

To make technologies simpler

  • Home
  • Data Structures
    • Linked List
    • Graph
    • Hashing
    • Stack
    • Queue
    • Priority Queue
    • Tree
      • Binary Tree
      • Binary Search Tree
    • wordpress
  • Programming
    • Unix
    • Dynamic Programming
    • C
    • C++
      • C++11
    • Python
  • Technology
    • Diameter
    • Microservices
    • Networking
    • Telecom
    • Tools
  • Questions & Answers
    • Programming Questions
    • Interview Questions
  • Contact Us
  • Home
  • Data Structures
    • Linked List
    • Graph
    • Hashing
    • Stack
    • Queue
    • Priority Queue
    • Tree
      • Binary Tree
      • Binary Search Tree
    • wordpress
  • Programming
    • Unix
    • Dynamic Programming
    • C
    • C++
      • C++11
    • Python
  • Technology
    • Diameter
    • Microservices
    • Networking
    • Telecom
    • Tools
  • Questions & Answers
    • Programming Questions
    • Interview Questions
  • Contact Us

Tag: Count longest contiguous 0 and 1

Programming Questions

Count Longest Continuous 0 and 1 in a Binary String

adminby admin

Given a binary string contains 0’s and 1’s. Write a program to find the longest contiguous occurrence of 0’s and 1’s.
For example:
Input string — 0 1 0 0 0 1 1 0 1 1 0 1 1 1 0 1 0 0 0 1
Length_0: 3 Length_1: 3

Input string — 1 0 0 1 1 1 0 1 1 0 0 0 0 0 1 0 1 0 1 0
Length_0: 5 Length_1: 3

(more…)
Count Longest Continuous 0 and 1 in a Binary String Read More

Search

  • Program To Check Whether A Binary Search Tree Is AVL Tree
  • AVL Tree Self Balancing Rotations – Right Left Rotation explained
  • Binary Search Tree Deletion Of Node Explained With Simple Example
  • Diameter Protocol Message Structure
  • Hashing Explained With Simple Example
  • Python string operations: Indexing and Slicing
  • AVL Tree Self Balancing Rotations – Left Right Rotation explained
  • Diameter Protocol AVP Structure
  • Difference Between Friend Function and Member Function
  • Program to Count the leaf nodes in a Binary Tree
Copyright © 2026 SimpleTechTalks. Privacy Policy