Yahoo India Web Search

Search results

  1. 3 days ago · The naive solution is to simply sort the array using a standard sorting algorithm or sort library function. This will simply place all the 0s first, then all 1s and 2s at last. This approach requires O (N * log (N)) time and O (1) space. [Better Approach] Counting 0s, 1s and 2s – Two Pass – O (N) Time and O (1) Space.

    • 8 min
  2. 2 days ago · Binary (Base-2): Essential for digital circuits and logical operations, where data is processed in bits (0s and 1s). Decimal (Base-10): Naturally intuitive for human use due to its alignment with our ten fingers, making it ideal for everyday arithmetic.

  3. 3 days ago · One of the robust and indispensable components of the CPU is the arithmetic and logic unit (ALU). It carries our mathematical (addition, subtraction, multiplication, and division), logical (AND, OR, and NOT), and bit-shifting operations on binary data (0s and 1s).

  4. 3 days ago · Given an integer n > 0, the task is to find whether this integer has an alternate pattern in its bits representation. For example- 5 has an alternate pattern i.e. 101. Print “Yes” if it has an alternate pattern otherwise “No”. Here alternate patterns can be like 0101 or 1010. Examples: Input : 15. Output : No.

  5. 1 day ago · An assembler is a software program that converts the assembly language code into machine code (a pattern of 0s and 1s), making it easy for computers to interpret and process.

  6. 2 days ago · Definition. The SNR represents the ratio between the signal and the background noise. If we have a high SNR, it means that the strength of our signal is significantly greater than the noise. When we’re discussing the SNR in data communication, a high SNR will indicate that we’re successfully transmitting information.