Skip to content

Instantly share code, notes, and snippets.

View mohawow's full-sized avatar
🎯
Focusing

Mohammed Almahbashi mohawow

🎯
Focusing
  • San Francisco, California
View GitHub Profile
## Binary and Bitwise Operators
Binary Digit:
- What is 2^5 in binary?
- What is 2^5 - 1 in binary?
- What is the general rule for binary numbers which are of the form 2^n or 2^n - 1?
Two's Complement:
- Implement a function that takes in an integer and prints out its two's complement value by following the algorithm described above.
Hint: to invert the bits of a number you can use the "~" operator. For example ~25 will invert the bits of the integer 25.
isEven has constant run time complexity (O(1))
areYouHere has polynomial run time complexity (O(n^2))
doubleArrayValues has linear run time complexity (O(n))
naiveSearch has linear run time complexity (O(n))
createPairs has polynomial run time complexity (O(n^2))
generateFib has linear run time complexity (O(n))
efficientSearch has logarithmic run time complexity (O(log n))
findRandomElement has constant run time complexity (O(1)).
isPrime has linear run time complexity (O(n))
I met with Rasheed who is Amazon Flex Driver. He tested the app and his feedback was that input fields
for time block needs be responsive by providing suggestion/ drop down menu, Also hide tip field from the form.
I went a head and added the native date picker so its easier for the user to choose the date, also I did the same implementation
for the time entry. I also hide the tip field.
@mohawow
mohawow / basic_router.jsx
Created February 12, 2019 02:32 — forked from siakaramalegos/basic_router.jsx
Basic example of React Router: BrowserRouter, Link, Route, and Switch
// BrowserRouter is the router implementation for HTML5 browsers (vs Native).
// Link is your replacement for anchor tags.
// Route is the conditionally shown component based on matching a path to a URL.
// Switch returns only the first matching route rather than all matching routes.
import {
BrowserRouter as Router,
Link,
Route,
Switch,
} from 'react-router-dom';
As a user, I should be able to register.
As a user, I should be able to login after registeration.
As a user, I should be able to add new trip.
As a user, I should be able save my trips.
As a user, I should be able to view my trips.
As a user, I should be able to update my trips.
As a user, I should be able to view claculated hourly tips.
Purpose statement and app name:
Shadow is web appliction service that help Amazon Felx drivers to track thier trips.
- Amazon Felx drivers can view their historical data online.
- Amazon Felx drivers can view charts of thier hourly revenue and Tips.
- Amazon Felx drivers can view past fares and recommends profitable blocks (shift).
https://efficacious-bell.glitch.me/
https://flowery-node.glitch.me/
https://grave-schooner.glitch.me/
https://noiseless-racer.glitch.me/
https://glitch.com/edit/#!/puffy-tin?path=src/components/surprise.js:28:1
https://glitch.com/edit/#!/ebony-pea?path=src/components/rate-calculator.js:28:32
@mohawow
mohawow / Drill
Last active January 20, 2019 18:28
https://glitch.com/edit/#!/adorable-bagel?path=src/components/navigation-bar.js:25:0
https://glitch.com/edit/#!/orange-macaroni?path=src/components/address-book.js:13:4