14 Days Study Plan to Crack Algo

Day 14

190. Reverse Bits

Input: n = 00000010100101000001111010011100
Output: 964176192 (00111001011110000010100101000000)
Explanation: The input binary string 00000010100101000001111010011100 represents the unsigned integer 43261596, so return 964176192 which its binary representation is 00111001011110000010100101000000.
Input: n = 11111111111111111111111111111101
Output: 3221225471 (10111111111111111111111111111111)
Explanation: The input binary string 11111111111111111111111111111101 represents the unsigned integer 4294967293, so return 3221225471 which its binary representation is 10111111111111111111111111111111.

136. Single Number

Input: nums = [2,2,1]
Output: 1
Input: nums = [4,1,2,1,2]
Output: 4
Input: nums = [1]
Output: 1

--

--

--

Consistency achieves everything https://github.com/paigekim29

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Create Radio Inputs Easily in React Native

LeetCode problem #33 — Search in Rotated Sorted Array (JavaScript)

SOLID Principles in Delphi [4] — the Interface Segregation Principle

LeetCode problem #19–Remove nth node from end of list (JavaScript)

Show validation error Message in the form using React Native Expo

Introducing: Custom Development Clients

Learn Angular From 0 to 100 — Webpack

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Joo Hee Paige Kim

Joo Hee Paige Kim

Consistency achieves everything https://github.com/paigekim29

More from Medium

14 Days Study Plan to Crack Algo I

LeetCode 200 — Number of Islands

LeetCode 101

Do not ask this question in Coding Interview