Close Menu
    Code and Debug
    • Home
    • Our Courses
    • Blog
    • About Us
    • Contact Us
    Facebook X (Twitter) Instagram YouTube WhatsApp
    • Home
    • Our Courses
    • Blog
    • About Us
    • Contact Us
    Facebook Instagram YouTube LinkedIn WhatsApp

    Code and Debug – BlogCode and Debug – Blog

    Code and Debug – BlogCode and Debug – Blog
    Data Structures & Algorithms

    Count occurrences of a number in a sorted array with duplicates | Optimal Binary Search

    4 Mins Read

    Given a sorted array, arr[] and a number target, you need to find the number of occurrences of target in arr[]. Here’s the [Problem Link] to begin with.…

    Data Structures & Algorithms

    Find First and Last Position of Element in Sorted Array | Leetcode 34 | Optimal Binary Search

    5 Mins Read

    Given an array of integers nums sorted in non-decreasing order, find the starting and ending position of a given target value. If target is not found…

    Data Structures & Algorithms

    Ceil The Floor | Binary Search Implementation

    3 Mins Read

    For a sorted array a[] of length n and a value x, you must return both: If either does not…

    Data Structures & Algorithms

    Search Insert Position | Leetcode 35 | Explained in Python

    3 Mins Read

    Given a sorted array of distinct integers and a target value, return the index if the target is found. If…

    Data Structures & Algorithms

    Implement Upper Bound

    3 Mins Read

    In a sorted array arr[], the upper bound of x is the index of the first element that is strictly…

    Data Structures & Algorithms

    Implement Lower Bound | Floor in a Sorted Array (GFG)

    4 Mins Read

    Given a sorted array arr[] and an integer x, find the index (0-based) of the largest element in arr[] that is less than…

    Data Structures & Algorithms

    Binary Search | Leetcode 704 | Explained in Python

    5 Mins Read

    Given an array of integers nums which is sorted in ascending order, and an integer target, write a function to search target in nums. If target exists, then…

    Data Structures & Algorithms

    Majority Element II | Leetcode 229 | Explained in Python

    5 Mins Read

    You’re given an integer array nums of length n.An element is called a majority element II if it appears strictly…

    Data Structures & Algorithms

    Array Leaders | Optimal Solution in Python

    3 Mins Read

    Given an array arr[] of size n, an element is called an Array Leaders if it is greater than or…

    Data Structures & Algorithms

    Majority Element | Leetcode 169 | Explained in Python

    4 Mins Read

    The “Majority Element” problem (LeetCode #169) asks you to find the value that appears strictly more than ⌊ n /…

    Previous 1 … 14 15 16 17 18 … 25 Next
    Categories
    • Data Structures & Algorithms (241)
      • Beginner (82)
      • Expert (52)
      • Intermediate (106)
    • Pandas (1)
    • Resume (1)
    Recent Posts

    Pandas Python: The Complete Roadmap for Beginners in 2026

    8 April 2026

    DSA Interview Cheat Sheet: All Patterns You Need to Know

    4 April 2026

    Symmetric Tree | Leetcode 101 | Recursive DFS Approach

    2 September 2025

    Binary Tree Right Side View | Leetcode 199 | BFS and DFS Approaches

    2 September 2025

    Bottom View of Binary Tree | BFS with Horizontal Distance Mapping

    2 September 2025
    Facebook Instagram YouTube LinkedIn WhatsApp
    © 2025 Code and Debug. All rights reserved.

    Type above and press Enter to search. Press Esc to cancel.