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

  • Difference Between Friend Function and Member Function
  • C++11: extern template Explained With Simple Example
  • Binary Search Tree Deletion Of Node Explained With Simple Example
  • Diameter Protocol Basics
  • AVL Tree Explanation With Simple Examples
  • AVL Tree Deletion Of Node Explained With Simple Example
  • Topological Sort Explained With Simple Example
  • std::bitset explained with simple example
  • Difference between constexpr vs inline functions
  • Binary Tree Inorder Traversal Explained With Simple Example
Copyright © 2025 SimpleTechTalks. Privacy Policy