Home Tags Posts tagged with "Bitwise"
Tag:

Bitwise

Algorithms involving bitwise operators

  • Ever wondered where those zeros and ones that computers supposedly work with are actually located? While you’re writing code in high-level programming languages, the system quietly manipulates these binary digits behind the scenes. Understanding bit manipulation can make your programs very, very fast – and that’s exactly why tech companies love engineers who master these concepts. What Are Bits and Why Should You Care? A bit is the smallest form of memory that can be occupied in a computer. Simply put, it’s either set (1) or not set (0) – …

    0 FacebookTwitterLinkedinWhatsappEmail
  • Arrays

    Single non-repeating number

    by nikoo28
    4 minutes read

    Let us suppose you are given an array of integers. The special thing about this array is that all numbers are repeated twice except one. Find the single non-repeating number. Example 1:Input: [2, 1, 1]Output: 2 Example 2:Input: [4, 5, 5, 2, 2]Output: 4 Problem statement: You are given an array of all positive integers. All the integers are repeated exactly twice except one. We need to find that number with a linear time complexity and using the minimum space possible. Brute Force Method: When tackling such problems, it is …

    1 FacebookTwitterLinkedinWhatsappEmail

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More