I hereby claim:
- I am tareksamni on github.
- I am tareksamni (https://keybase.io/tareksamni) on keybase.
- I have a public key whose fingerprint is C0DB 7A03 2B16 0ED1 BFA7 2C81 BC08 DF8C 3992 E6C0
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| # Input: | |
| businesses = [ | |
| { rating: 1, id: 1000 }, | |
| { rating: 4, id: 1020 }, | |
| { rating: 5, id: 1300 }, | |
| { rating: 5, id: 1040 }, | |
| { rating: 9, id: 1005 }, | |
| { rating: 2, id: 1104 }, | |
| { rating: 3, id: 1400 } | |
| ] |
Just another interview problem ..
Given the following code:
def bst_distance(values, n, node1, node2)
# write you code here
end| # Just another easy interview question in Ruby | |
| # Description: https://www.hackerrank.com/challenges/balanced-brackets | |
| # This solution is also expecting other chars other than the brackets | |
| POSSIBLE_BRACKETS = %w({ } [ ] < > \( \)).freeze | |
| MATCHING_BRACKETS = { | |
| '{' => '}', | |
| '[' => ']', | |
| '<' => '>', | |
| '(' => ')' | |
| }.freeze |
| version: '2.1' | |
| services: | |
| db: | |
| image: bla_bla:1234/mysql:5.6 | |
| environment: | |
| - MYSQL_ROOT_PASSWORD=XXXX | |
| - MYSQL_DATABASE=bla_bla_dev | |
| - MYSQL_USER=XXXX | |
| - MYSQL_PASSWORD=XXXX | |
| ports: |
| ## For more details refer to: http://tsamni.com/post/84515089035/sidekiq-performing-background-or-delayed-jobs-with | |
| ## .ebextensions/sidekiq.config | |
| commands: | |
| create_post_dir: | |
| command: "mkdir /opt/elasticbeanstalk/hooks/appdeploy/post" | |
| ignoreErrors: true | |
| files: | |
| "/opt/elasticbeanstalk/hooks/appdeploy/post/50_restart_sidekiq": | |
| mode: "000777" | |
| content: | |
| ## For more details refer to: http://tsamni.com/post/84515089035/sidekiq-performing-background-or-delayed-jobs-with | |
| # config/redis.yml | |
| # Redis db configuration file | |
| # development environment | |
| development: | |
| host: 'localhost' | |
| port: '6379' | |
| # local testing environment | |
| test: |