Sunday, November 17, 2019

Reactive Streams Implementations Trends (Akka, RxJava, Vert.x, Spring Reactor)

Google trends showing popularity of Reactive Streams Implementations below:


1. Akka
2. RxJava
3. Vert.x
4. Spring Reactor

Sunday, October 20, 2019

Java Open Source ERPs / CRMs Trends (Openbravo, APache OFBiz, ADempiere, iDempiere, Compiere, Metasfresh, etc.)

Google trends showing popularity of Java Open Source ERPs / CRMs below:

https://trends.google.com/trends/explore?date=today%205-y&q=%2Fm%2F0gwby7,%2Fm%2F01h7s6,%2Fm%2F0_yfmv6,%2Fm%2F0264f7v,%2Fm%2F02836zp

https://trends.google.com/trends/explore?date=today%205-y&q=adaxa,%2Fm%2F0dsc06v,%2Fg%2F11c6cdwzml,%2Fg%2F11gh3551s9

1. Openbravo
2. OFBiz
3. ADempiere
4. iDempiere
5. Compiere
6. Metasfresh - uses React/Redux
7. Adaxa
8. HeliumV
9. Kuali

Java Open Source CMSs Trends (Alfresco, DSPace, Nuxeo, XWiki, OFBiz, etc.)

Google trends showing popularity of Java Open Source CMSs below:

https://trends.google.com/trends/explore?date=today%205-y&q=%2Fm%2F0264f7v,%2Fm%2F07l2hp,%2Fm%2F08cwpy,%2Fm%2F03c5qw6,%2Fm%2F06mzcg

https://trends.google.com/trends/explore?date=today%205-y&q=%2Fm%2F02w759,%2Fm%2F04gsmk,bloomreach,%2Fm%2F08pcrs,%2Fm%2F0462fc7

https://trends.google.com/trends/explore?date=today%205-y&q=%2Fm%2F0n8_xnd,%2Fg%2F11g9l_tn_b,%2Fm%2F0462fc7,%2Fm%2F063k7f1,%2Fm%2F064n79j

https://trends.google.com/trends/explore?date=today%205-y&q=%2Fg%2F12lnhfzk2,%2Fg%2F11g9l_tn_b,%2Fm%2F0gk_spp

1. Alfresco
2. DSpace
3. Nuxeo
4. XWiki
5. OFBiz
6. BloomReach (Hippo CMS)
7. OpenCMS
8. Jahia
9. Magnolia CMS
10. DotCMS
11. LogicalDOC
12. Ametys
13. Crafter CMS
14. Fedora Commons
15. Enonic
16. OpenWGA

Wednesday, January 30, 2019

Software Configuration Management Trends (Ansible, Puppet, SaltStack, Chef, Terraform)

At the moment, Ansible and Terraform are the leaders in Infrastructure as Code.

Google trends show popularity of software configuration management tools below:

https://trends.google.com/trends/explore?date=today%205-y&q=%2Fm%2F03d3cjz,%2Fm%2F0hn8c6s,%2Fm%2F08_7zcp,%2Fm%2F0k0vzjb,%2Fg%2F11g6bg27fp

1. Ansible - Python-based
2. Puppet - Ruby-based
3. SaltStack - Python-based
4. Chef - Ruby and Erlang
5. Hashicorp Terraform - Go-based

Sunday, July 16, 2017

Master Your Apple Mac - 10 Top Essential Tips and Tricks - Udemy

https://www.udemy.com/10-top-yosemite-tips-and-tricks

1. Screenshots

Cmd+Shift+3 - Take Screenshot
Cmd+Shift+4 - Take Screenshot of selected portion
Cmd+Shift+4 then Space - Take Screenshot of application

2. Hot Corners - Mission Control

3. Batch Renaming

4. LaunchPad

5. Airdrop

Cmd + Shift + R

6. Trackpad Gestures

7. Mail Markup

8. Full Web Address - Safari

9. Screensaver Password

10. Best Anti-virus - AVG

Wednesday, June 07, 2017

Running React Native Packager and Android Emulator on a Different Port

React Native Packager and the Android Emulator uses port 8081 by default. To use a different port (let's say 8082):

1. Add "--port=8082" to the react-native start command, like this:

react-native start --port=8082

2. With your application open in the Android Emulator (and has an error because it can't read from port 8081), trigger the developer menu using the following on the command line:

adb shell input keyevent 82 

3. Navigate to Dev Settings > Debug server host & port for device, and enter your host and port, use this Stackoverflow comment as guide: https://stackoverflow.com/questions/37900078/react-native-could-not-connect-to-development-server/38117960#38117960

Wednesday, March 23, 2016

Common PowerMock and EasyMock Use Cases and Properties

Hand-rolled Mocks
  • They're Fast

EasyMock
  • Use when a Hand-rolled mock will be very large and/or cumbersome
  • If you do not need any PowerMock features

 PowerMock
  • Hard to trace using debugger
  • If you need assumptions about the internal code that cannot be reached by EasyMock
  • For testing with statics and singletons
  • For testing difficult to mock classes like java.io.File
  • For accessing private fields
  • For suppressing methods

Monday, March 23, 2015

Algorithms Books and Online Judges Tandems

Here are some of them:

1. UVa Online Judge + Skiena/Revilla, Halim





2. ACM-ICPC Live Archive + Revilla/Poucher





3. Rosalind Algorithmic Heights + Dasgupta/Papadimitriou





4. Rosalind Bioinformatics + Compeau/Pevzner





5. Programming Challenges + Skiena/Revilla





6. Codility + Codility

They do have their own learning materials.

Thursday, March 19, 2015

Academic Online Judges

1. UVa Online Judge
2. URI Online Judge 
3. Sphere Online Judge (SPOJ)
4. Aizu Online Judge
5. Timus Online Judge 
6. PKU JudgeOnline
7. Zhejiang University Online Judge
8. El Judge
9. Tsinghua Online Judge
10. Caribbean Online Judge
11. Don Mills Online Judge
12. National Tsing Hua University Online Judge
13.Tianjin University Online Judge
14. Programming Club IIT Kanpur
15. Saratov State University Online Contester
16. PEG Judge
17. IARCS Problems Archive
18. RACSO Online Judge
19. Baekjoon Online Judge
20. GEPWNAGE Online Judge
21. Shanghai Jiao Tong University Online Judge
22. JollyBee Online Judge - BINUS University
23. Herbert Online Judge
24. LightOJ
25. FAU Online Judge
26. National Taiwan University Online Judge
27. ZeroJudge
28. UESTC Online Judge
29. Programming Challenges
30. ZeroJudge.tw
31. Teddy Online Judge
32. Sicily Online Judge
33. Kattis
34. Assumption University Online Judge
35. RealOJ
36. Sichuan University Online Judge
37. Jobdu Online Judge
38. Wuhan Online Judge
39. ShareCode
40. NUC Online Judge
41. HIT Online Judge
42. TNFSH Online Judge
43. TIOJ INFOR Online Judge
44. JKKNIU
45. ACDream
46. HDU Online Judge
47. ICPC Live Archive
48. HUST OJ
49. Fuzhou University Online Judge
50. Lydsy
51. Central South University Online Judge
52. Lviv National University Online Judge
53. Colombian Collegiate Programming League



Wednesday, March 18, 2015

Codingame Puzzles



Single Player: 51

Tutorial
1. Onboarding -> finding a minimal value

Easy
1. Power of Thor -> condition statements (if...).
2. The Descent -> search in an array
3. Skynet: the Chasm -> conditional statements (if...)
4. Mars Lander - Level 1 -> Speed regulation.
5. Temperatures -> search in an array.
6. ASCII Art -> proper storage and retrieval in an array.
7. Chuck Norris -> encoding/decoding.
8. MIME Type -> maps, string parsing.
9. Defibrillators -> Distance calculation, Big data.
10. Horse-racing Duals -> sorting, finding a minimum.


Medium
1. Skynet: the Virus -> search in a graph.
2. Heat Detector -> Convergence.
3. Teads Sponsored Challenge -> Graph theory
4. Winamax Sponsored Challenge -> String manipulation
5. Mars Lander - Level 2 -> Position, speed and angle regulation.
6. The Paranoid Android -> greedy algorithm.
7. Indiana - Level 1 -> maps.
8. Stock Exchange Losses -> Search through a set of values. Dynamic Programming
9. Network Cabling -> Optimal distance.
10. Conway Sequence -> Conway sequence.
11. Telephone Numbers -> storage optimization. Tries
12. Dwarfs standing on the shoulder of giants -> Tree traversal.
13. Bender, a depressed robot -> Trajectory Calculation.
14. Scrabble -> Weighting.
15. The Gift -> Distribution.
16. Mayan Calculation -> Algebraic calculations.
17. APU - Init Phase -> Searching in a list


Hard
1. The Labyrinth -> Pathfinding, optimization.
2. Skynet strikes back -> Tree search and traversal.
3. The Paranoid Android - One step further -> pathfinding and optimisation.
4. Skynet: The Bridge -> Depth-first search or Backtracking
5. Indiana - Level 2 -> Pathfinding.
6. Vox Codei -> Brute-force.
7. Thor VS Giants -> Centroid computation.
8. Super Computer -> Scheduling.
9. Roller Coaster -> Calculation.
10. CGX Formatter -> Text formatting.
11. TAN Network -> Pathfinding in a graph.
12. Genome Sequencing -> Pattern recognition. Permutations
13. Surface -> Grid flooding.
14. Bender - The Money Machine -> Weighted Pathfinding
15. Bender - Algorithmic Complexity -> Complexity calculation.
16. APU - Improvement Phase -> Backtracking, Pruning, Brute-forcing

Very Hard
1. Nintendo Sponsored Challenge -> C++
2. Triangulation -> Triangulation.
3. The Resistance -> Decyphering.
4. Indiana - Level 3 -> Pathfinding in a grid.
5. Vox Codei - Redux -> brute-force, exploration.
6. Music Scores -> Image (as bit array) processing.
7. Mars Lander - Level 3 -> Position, speed and angle regulation.

Multiplayer
1. Tron Battle
2. Game of Drones
3. Poker Chip Race
4. Poker Chip Race
5. Platinum Rift
6. Platinum Rift 2
7. The Great Escape

Monday, January 19, 2015

Steve Yegge - Get that job at Google - Short Summary



Data Structures and Algorithms

- Algorithm Complexity/Big-O
- Sorting: Mergesort/Quicksort
- Hashtables
- Trees: binary trees, n-ary trees, tries, Red-Black/AVL/splay tree
- Traversal: BFS, DFS, inorder, preorder, postorder
- Graphs: objects-pointers/adjacency-list/matrix representation, traversal
- Dijkstra, A*
- NP-completeness, traveling salesman, knapsack




Others

- Discrete Math
- OS: processes, threads, concurrency, locks, mutexes, semaphores, monitors, deadlock, livelock, context switching, scheduling
- bring your own dry-erase marker

Friday, December 12, 2014

Codility Lessons - Slides

Updated: Jul. 22, 2016
1. Iterations

Tasks: 1/1

for loop, while loop, looping over a collection


2. Arrays

Tasks: 1/2

array operations, reversing an array


3. Time Complexity 

Tasks: 3/3

dominant operation, space complexity, arithmetic sequence/progression, arithmetic series: n(n+1)/2


4. Counting Elements

Tasks: 4/4

swapped elements in identical lists


5. Prefix Sums


Tasks: 2/4


6. Sorting

Tasks: 3/4


7. Stacks and Queues

Tasks: 2/4


8. Leader

Tasks: 2/2

Boyer-Moore Majority algorithm


9. Maximum Slice Problem

Tasks: 3/3

Kadane's algorithms for negative and non-negative elements, Maximum profit, wrong approaches: two pointers, etc.


10. Prime and Composite Numbers

Tasks: 2/4

If i is a divisor of n, n/i is also a divisor. 1 is neither prime nor composite.


11. Sieve of Eratosthenes

Tasks: 1/2

Semiprimes (product of two primes, bonus: prefix sums)


12. Euclidean GCD Algorithm

Tasks: 1/2

Original GCD algorithm by Euclid:  Recursively subtract the smaller number from the larger. GCD by subtraction, GCD by Division, LCM.


13. Fibonacci Numbers

Tasks: 2


14. Binary Search

Tasks: 2

15. Caterpillar Method

Tasks: 4


16. Greedy Algorithms

Tasks: 2


17. Dynamic Programming

Tasks: 2


18. Indeed Prime 2015 challenge

Tasks: 3


19. Indeed Prime 2016 challenge

Tasks: 4


20. Indeed Prime 2016 College Coders challenge

Tasks: 1/4


19. Future training

Tasks: 5


Total Tasks: 63

Wednesday, November 19, 2014

Learn Programming Languages and Technologies Interactively Online

Updated: April 27, 2017

Most of these are introductory tutorials. It would be a good challenge to be able to finish most or all of these.

NOTES:
- Codecademy covers most of the web-related languages and keeps track of progress
- The learn*.org groups of sites (ex: http://www.learn-c.org) also covers a lot of languages
- InteractivePython has mappings to several books and is somewhat an interactive textbook
- PythonTutor and the derivatives in other languages (Java, Ruby, Javascript) provides nice step-by-step visualization of the programs being run


Bash
http://www.learnshell.org
https://www.hackerrank.com/domains/shell/bash

Bootstrap
https://www.freecodecamp.com

C
http://www.learn-c.org

C++

http://www.learn-cpp.org

C#
http://www.learncs.org

Chrome Developer Tools
https://www.freecodecamp.com

Clojure
http://codecombat.com

CoffeeScript
http://codecombat.com

CSS
https://dash.generalassemb.ly
https://www.codecademy.com/learn/learn-html-css
http://www.codecademy.com/tracks/web
https://www.codeschool.com
http://cssgridgarden.com
http://flexboxfroggy.com
https://flukeout.github.io
https://www.freecodecamp.com
https://www.learn-html.org

Express.js
https://www.freecodecamp.com

Git
https://www.freecodecamp.com

Go
http://tour.golang.org

HTML
https://dash.generalassemb.ly
https://www.codecademy.com/learn/learn-html-css
http://www.codecademy.com/tracks/web
https://www.codeschool.com
https://www.freecodecamp.com
https://www.learn-html.org

Io
http://codecombat.com

Java
http://www.learnjavaonline.org

Javascript
https://dash.generalassemb.ly
http://www.codecademy.com/tracks/javascript
http://www.learn-js.org
http://codecombat.com
https://www.codeschool.com
https://www.freecodecamp.com

jQuery
http://www.codecademy.com/tracks/jquery
https://www.freecodecamp.com

Node.js
https://www.freecodecamp.com

Lua
http://codecombat.com

MongoDB
https://www.freecodecamp.com

PHP
http://www.codecademy.com/tracks/php
http://www.learn-php.org

Perl
http://www.learn-perl.org

Python
http://www.codecademy.com/tracks/python
http://www.learnpython.org
http://www.pyschools.com
http://interactivepython.org
http://pythonmonk.com
https://www.hackerrank.com/domains/miscellaneous/python-tutorials
http://www.pythonchallenge.com
http://codecombat.com
http://www.checkio.org
http://www.trypython.org

R
http://tryr.codeschool.com
https://www.datacamp.com

React
https://www.freecodecamp.com

React Native

https://facebook.github.io/react-native
http://www.reactnativeexpress.com

Regex
https://regexcrossword.com
https://www.hackerrank.com/domains/regex/re-introduction

Ruby
http://www.codecademy.com/tracks/ruby
https://rubymonk.com
https://www.codeschool.com
http://www.learn-ruby.org

Scala
https://www.scala-exercises.org
http://www.scala-tour.com/
http://scalatutorials.com/

Talentbuddy Problems

Updated: June 15, 2015

Total: 136
Normal: 50
Medium: 56
Hard: 30

Normal
  1. Average grade
  2. Binary
  3. Binary float
  4. Bottle
  5. Bounce rate
  6. Caesar shift
  7. Common courses
  8. Copy-Paste
  9. Count digits
  10. Count occurences
  11. Count ones
  12. Count substrings
  13. Count tokens
  14. Count words
  15. Countries
  16. Find character
  17. Find substring
  18. FizzBuzz
  19. Float division
  20. Growth
  21. Highest grade
  22. Integer division
  23. Invert sum
  24. Linear equation
  25. Max
  26. Mean
  27. Merge Sort
  28. Missing number
  29. Odd square sum
  30. Pair product
  31. Pair Sum
  32. Prediction
  33. Prime numbers
  34. Request counting
  35. Remove stop words
  36. Remove substring
  37. Scheduling
  38. Select substring
  39. Simple sum
  40. Sorting Students
  41. Sort names
  42. Sort words
  43. Sorting students
  44. Standard deviation
  45. Student progress
  46. Successful students
  47. Time
  48. Top locations
  49. Vowel count
  50. Z-score
Medium
  1. 2^n
  2. Arithmetic evaluation
  3. AST Part One
  4. Bacon number
  5. Balanced brackets
  6. Basic search query
  7. Book store
  8. Brands
  9. Compute average
  10. Copy async
  11. Currency exchange
  12. Depth first traversal
  13. Dispatcher 
  14. Divide by 2
  15. Even number
  16. Find String
  17. Fraction
  18. Heads and tails
  19. Indexes
  20. Intersecting street segments
  21. Linked List Cycle
  22. Longest improvement
  23. Longest palindrome
  24. Longest street segment
  25. Majority number
  26. Max sum
  27. Median
  28. Medical app
  29. Multiply by 2
  30. Neighbourhood
  31. Nth number
  32. Nth permutation
  33. PACO
  34. Parallel async
  35. Plane tickets
  36. Power of 2
  37. Precision
  38. Priority
  39. Purchase tracking
  40. Query tokens stemming
  41. Rain
  42. Read async
  43. Relative sort
  44. Selection
  45. Semantic analysis
  46. Set bit
  47. Shopping cart
  48. Skyscrapers
  49. Sorted merge
  50. Speed
  51. Swap values
  52. Tokenize query
  53. Topological sort
  54. Unset bit
  55. User administration
  56. User table
Hard
  1.  AST Part Two
  2. Check
  3. Chocolate bars
  4. Coins
  5. Contact management
  6. Context extraction
  7. Context pruning
  8. Extract book titles
  9. Failure detection
  10. Fast power
  11. Hash String
  12. Intermediary code
  13. LLVM parser
  14. Map matcher
  15. Mapper
  16. Palindromes count
  17. Pouring
  18. Price experiment
  19. Pub crawl
  20. Reducer
  21. Selection
  22. Simple expression
  23. Social network
  24. Sqrt
  25. Streets nearby
  26. Trigger words
  27. Tuple sum
  28. Tweets per second
  29. Typeahead
  30. Unique sequence

Number of Talentbuddy Practice Problems in Groups


Updated: March 8, 2015
  1. Languages - 34
    1. Getting Started - 2
    2. Web Analytics - 5
    3. Classroom Analysis - 7
    4. Text Editor - 5
    5.  Data Conversion - 6
    6. Simple Loops - 6
    7. Expressions - 3
  2. Tech Interviews - 52
    1. Elementary Data Structures - 7
    2. Sorting and Order Statistics - 6
    3. Search - 5
    4. Elementary Graph Problems - 9
    5. Advanced Techniques - 3
    6. Math - 7
    7. General Interview Practice - 5
    8. HubSpot Challenges - 2
    9. Redbeacon Challenges - 2
    10. Twitter Challenges - 2
    11. Uber Challenges - 4
  3. Databases - 11
    1. MongoDB Basics - 7
    2. Redis Basics -  4
  4. Projects - 24
    1. Search Engine - 4
    2. Books - 4
    3. Map Reduce - 4
    4. GPS Positioning - 5
    5. Sysmbolic Execution - 7
  5. Fun - 141
    1. Tokenize Query - Lessons - 4
    2. Bounce Rate - Lessons - 3
    3. Computer Vision - Lessons - 3
    4. Programming Basics - 6
    5. Expressions - 3
    6. Simple Loops - 6
    7. Data Conversion - 6
    8. Search - 5
    9. Advanced Techniques - 3
    10. Twitter Challenges - 2
    11. Text Editor - 5
    12. Search Engine - 4
    13. MongoDB Basics - 7
    14. Redis Basics - 4
    15. Elementary Graph Problems - 9
    16. Google Interview - 4
    17. Simple Interview - 2
    18. HubSpot Challenges - 2
    19. Uber Challenges - 4
    20. Web Analytics - 5
    21. Classroom Analysis - 7
    22. Books - 4
    23. GPS Positioning - 5
    24. Map Reduce - 4
    25. Symbolic Execution - 7
    26. Getting Started - 2
    27. Elementary Data Structures - 7
    28. Sorting and Order Statistics - 6
    29. Math - 7
    30. General Interview Practice - 5
    31. Redbeacon Challenges - 2
    32. Async JavaScript - 3

Monday, November 17, 2014

Runner Runner - Surprising Life Lessons


It's dangerous to work for gambling-related businesses. I assume most, if not all, people there are psychopaths. (How about public a.k.a. share-price-driven companies? Most companies?)

Been offered to work for one before, turned it down to protect my religious reputation. Turns out, protecting this reputation protects my life, too. Reputation is everything, says one of the 48 Laws of Power.

Someone I know worked for a company whose client is a casino. Also had psychopaths of their own. Or there are just a lot of psychopaths at the top?


Sunday, November 02, 2014

Competitive Programming Sites By Popularity

Updated: Aug 11, 2019

Search 100+ Online Judges (ex: Reverse a Linked List, FizzBuzz, Maximum Subarray, etc.)


1. GeeksforGeeks Practice
2. LeetCode
3. Kaggle
4. HackerRank
5. HackerEarth
6. CodeForces
7. CodeChef
8. Brilliant
9. InterviewBit
10. Codewars
11. Codingame
12. Codility
13. Topcoder
14. Project Euler
15. CodeFights
16. CodingBat
17. SPOJ
18. CoderByte
19. LintCode
20. UVA Online Judge
21. CheckiO
22. 
Kattis
23. 
SQL-EX.RU
24. 
PythonChallenge
25. CodeAbbey 
26. Rosalind 
27. CodeKata 
28. CSAcademy
29. CrowdANALYTIX
30. Elements of Programming Interviews Judge
31. CodeStepByStep
32. TunedIT
33. FightCode
34. HPC University

35. CodeEval
36. MLComp 
37. ChallengePost
38. BeatMyCode
39. Talentbuddy

Notable Others:
- Google Code Jam
- Facebook Hacker Cup

NOTES:
-  Most are based on the Online Judge system
- TopCoder, CrowdANALYTIX, Kaggle, ChallengePost and TunedIT have their focus on Data Science/Projects
- Codingame and FightCode have their focus on game playing programs, so this includes intelligent solutions, Machine Learning, AI
- MLComp is focused on Machine Learning
- Rosalind is focused on Bioinformatics
- SQL-EX.RU is the only one in the list focusing on SQLHackerRank added SQL, too.
 - HPC University is focused on High Performance Computing (HPC)
- CheckiO is focused on Python
- Most on the list, especially the commercial ones are pitching employment, just keep this in mind
- HackerEarthCodeEval, Talentbuddy, Codility, and Kattis are focused on Employment, have about 400 (practice), 185, 120, 90, and 600 problems respectively
GeeksforGeeks PracticeLeetCode and LintCode are focused on Tech Interview Problems, (have about ?, 180 and 160 problems, respectively). LeetCode also has some SQL problems.
- HackerRank includes other specialties from the other sites like AI (Codingame), Data Science (TopCoder, Kaggle), Python Tutorials (CheckiO), Eulerian Problems (Project Euler).
- HackerRank provides a good calendar that contains events from other sites like HackerEarth, CodeChef, URI Online Judge, TopCoder, CodeForces
- HackerRank-only features: Functional Programming specialization, Bash specialization, Linux Text utilities specialization
- Brilliant.org is more on High School Mathematics, and also are not a competition site, but they have problems in Computer Science, too.
- PythonChallenge is a programming riddles site and is actually not limited to Python 

Looking for Academic Online Judges?

Monday, October 27, 2014

NoSQL Companies Glassdoor Technical Interviews

DataStax (Cassandra)

1) Describe some challenges of provisioning software across a datacenter consisting of thousands of nodes

2) How would you go about programming the Kevin Bacon problem?


Couchbase

1) In databases, what is the difference between a delete statement and a truncate statement?


MongoDB

1) How would you design an online chat system with separate room

2) The input array was sorted integers, how to square all the elements and keep it sorted?

3) Taking in two strings, find out if they are anagrams

4) Find the largest prime divisor of a number

5) Given a string of parantheses, brackets, and curly braces, write a function that returns whether the string is well balanced, in that every left delimiter is closed by the correct right delimiter

6) Print the prime factors of the input number

7) How various search algorithm O time change if done in parallel on multi cpu machine

8) How many gas stations in the United States?

9) How would you write DB write / access functions to make sure data is not modified by threads.

10) Parse mathematical expression given as chars in array ['1', '+', '2,' '/', '4']

11) Write algorithm to find loop in graph. The graph is unidirectional with any number of connections. The graph is not necessarily connected

12) Write code to convert integer to string.

13) Fizzbuzz

14) Find the height of a binary tree

15) Parsing parenthesis. Given a set of open and close parenthesis, make sure the string is valid, such that each open parenthesis has a matching close parenthesis in the correct place

16) We have a person who logs into a website using their Facebook credentials. Anything they post to that website can be seen by their friends and those friends' friends only.

17) Name several different sorting algorithms and rank them by their computational complexity.

18) Write an algorithm that tells if 2 and only two numbers in a 1x3 array are the same.

19) Given a word, how to find all anagrams in a dictionary.

20) Reverse a linked list

21) How much water is on the planet (earth)?


Cloudera (Hadoop)

1) Design gmail from the ground up

2) Write a function to do the "Exponentiation" . i.e power(a,b) where a is raised to b. Eg: power(3,2) gives 9. power(5,2) gives 25 etc

3) Find the common elements in two arrays

4) Grid search algorithm and analyzing its time complexity, and then various alternative implementations that would minimize data storage or the order of the algorithm.

5) Given an m*n matrix with all its elments=1. Also given a list of (x,y) points. The question was to make the elements of xth row and yth column as zero. Optimise it.

6) Array Pair sum, provide O(N) solution

7) Recursive Permutation

8) Implement few methods of a Linked-list (like append, getAtIndex, removeAtIndex, size)

9) Find the total number of 1s in a byte array

10) Generate a random 4 letter word from /usr/share/dict/words

11) 1TB of data on my laptop --> sort the data

12) Distributed Merge Sort algorithm

13) A file contains a billion integers, try to find any one integer that is not in the file.

14) How would you find two numbers that add to a sum in an array?

15) How would you find three numbers that add to a sum in an array?

16) How would you implement hash table on your own? Write the code for implementing your own hash table?

17) If you wanted to make a highly concurrent cache with a least recently used replacement policy, what data structures would you use? How would this scale per number of threads?


Hortonworks (Hadoop)

1) Word sorting in a file

2) Binary search

3) Implement file system using class

4) Implement hashmap


MapR (Hadoop)

1) Implement a hash table

2) Determining if a tree is a valid binary tree

3) Write a recursive algorithm( return true if there is a path from root to a leaf with total sum == sum)

4) LRU Cache

5) There are numbers from 1..n in a list of numbers with size (n+k) with k duplicates. Print k duplicates.

6) Read from a huge file say 1tb and write it into a huge file and scale it

7) BFS, insert line breaks after every level (not necessarily balanced)

8) Clock angle question


Basho (Riak)



AeroSpike