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, June 07, 2017
Wednesday, March 23, 2016
Common PowerMock and EasyMock Use Cases and Properties
Hand-rolled Mocks
EasyMock
PowerMock
- 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.
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
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
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
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
4. Counting Elements
Tasks: 4/4
5. Prefix Sums
Tasks: 2/4
Tasks: 3/4
Tasks: 2/4
Tasks: 2/2
Boyer-Moore Majority algorithm
Tasks: 3/3
Kadane's algorithms for negative and non-negative elements, Maximum profit, wrong approaches: two pointers, etc.
Tasks: 2/4
If i is a divisor of n, n/i is also a divisor. 1 is neither prime nor composite.
Tasks: 1/2
Semiprimes (product of two primes, bonus: prefix sums)
Tasks: 1/2
Original GCD algorithm by Euclid: Recursively subtract the smaller number from the larger. GCD by subtraction, GCD by Division, LCM.
Tasks: 2
Tasks: 2
Tasks: 4
Tasks: 2
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
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/
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
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
Total: 136
Normal: 50
Medium: 56
Hard: 30
Normal
|
Number of Talentbuddy Practice Problems in Groups
Updated: March 8, 2015
- Languages - 34
- Getting Started - 2
- Web Analytics - 5
- Classroom Analysis - 7
- Text Editor - 5
- Data Conversion - 6
- Simple Loops - 6
- Expressions - 3
- Tech Interviews - 52
- Elementary Data Structures - 7
- Sorting and Order Statistics - 6
- Search - 5
- Elementary Graph Problems - 9
- Advanced Techniques - 3
- Math - 7
- General Interview Practice - 5
- HubSpot Challenges - 2
- Redbeacon Challenges - 2
- Twitter Challenges - 2
- Uber Challenges - 4
- Databases - 11
- MongoDB Basics - 7
- Redis Basics - 4
- Projects - 24
- Search Engine - 4
- Books - 4
- Map Reduce - 4
- GPS Positioning - 5
- Sysmbolic Execution - 7
- Fun - 141
- Tokenize Query - Lessons - 4
- Bounce Rate - Lessons - 3
- Computer Vision - Lessons - 3
- Programming Basics - 6
- Expressions - 3
- Simple Loops - 6
- Data Conversion - 6
- Search - 5
- Advanced Techniques - 3
- Twitter Challenges - 2
- Text Editor - 5
- Search Engine - 4
- MongoDB Basics - 7
- Redis Basics - 4
- Elementary Graph Problems - 9
- Google Interview - 4
- Simple Interview - 2
- HubSpot Challenges - 2
- Uber Challenges - 4
- Web Analytics - 5
- Classroom Analysis - 7
- Books - 4
- GPS Positioning - 5
- Map Reduce - 4
- Symbolic Execution - 7
- Getting Started - 2
- Elementary Data Structures - 7
- Sorting and Order Statistics - 6
- Math - 7
- General Interview Practice - 5
- Redbeacon Challenges - 2
- 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
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
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
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 SQL. HackerRank 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
- HackerEarth, CodeEval, Talentbuddy, Codility, and Kattis are focused on Employment, have about 400 (practice), 185, 120, 90, and 600 problems respectively
- GeeksforGeeks Practice, LeetCode 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?
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. FightCode34. HPC University
35. CodeEval
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 SQL. HackerRank 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
- HackerEarth, CodeEval, Talentbuddy, Codility, and Kattis are focused on Employment, have about 400 (practice), 185, 120, 90, and 600 problems respectively
- GeeksforGeeks Practice, LeetCode 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
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
Tuesday, April 16, 2013
Easyrec recommendation engine
... and others like it. Might be useful someday, somehow..
Tuesday, April 09, 2013
HashSet, TreeSet equivalent in Linux
I was thinking of implementing a command line version of Java HashSet, LinkedHashSet and TreeSet when I remembered sort and uniq.
Just use uniq as you would a HashSet/LinkedHashSet. And sort a you would a TreeSet. And use GnuWin32 on Windows.
Goodbye new open-source project. Perhaps a command line version of Map, SortedMap, and BidiMap?
Update (April 10, 2013): There is still hope for Set.retainAll() (union), Set.removeAll() (intersection)..
Just use uniq as you would a HashSet/LinkedHashSet. And sort a you would a TreeSet. And use GnuWin32 on Windows.
Goodbye new open-source project. Perhaps a command line version of Map, SortedMap, and BidiMap?
Update (April 10, 2013): There is still hope for Set.retainAll() (union), Set.removeAll() (intersection)..
Saturday, March 09, 2013
New technology weekend!
Node.js, Redis, MongoDB, Mashery I/O Docs, Google Apps Script...
Thursday, February 21, 2013
Java Enterprise Architecture Requirements: S.P.A.M.M.E.R.S
Section 2 (Common Architectures) of Java EE 5 Enterprise Architect Certified Master Exam has this: Explain the advantages and disadvantages of two-tier/three-tier/multi-tier architectures when examined under the following topics: scalability, maintainability, reliability, availability, extensibility, performance, manageability, and security. That's a lot of architectural requirements and the initial acronym is SMRAEPMS, which does't look easy to remember. Rearranging, we have:
S - scalability
P - performance
A - availability
M - maintainability
M - manageability
E - extensibility
R - reliability
S - security
Here's some spam:
Wednesday, February 13, 2013
My Java Development Tools for a New Computer
- Dropbox
- putty, pageant, puttygen
- winscp
- MySQL
- MySQL Workbench
- Java
- Eclipse
- Google Talk
- Skype
Editors:
- notepad++
- textpad
- HxD
Grep:
- dnGrep
- Windows Grep
Diff:
- Diffmerge - main
- Winmerge
- KDiff3
Zip:
- Winrar
- Winzip
- 7zip
Others:
- GnuWin32
- Chrome/Safari/Opera/Firefox
- Free Download Manager
- Filezilla FTP Client
- RealVNC
- Antivirus
When to use multithreading?
Based on my experiences:
1) When multiple tasks need to be running at the same time.
We created a mobile game where we have individual threads for the music, the graphics update, and for reading the input.
2) When it is beneficial for tasks to be running at the same time.
I needed to communicate with a web service that returns a very large amount of information. There is also a limit to the amount of information that it returns. This can be done serially, requesting chunks of information at a time. Multiple requests can also be done at the same time, so I opted for multithreading, significantly reducing the amount of time to retrieve all the needed information.
1) When multiple tasks need to be running at the same time.
We created a mobile game where we have individual threads for the music, the graphics update, and for reading the input.
2) When it is beneficial for tasks to be running at the same time.
I needed to communicate with a web service that returns a very large amount of information. There is also a limit to the amount of information that it returns. This can be done serially, requesting chunks of information at a time. Multiple requests can also be done at the same time, so I opted for multithreading, significantly reducing the amount of time to retrieve all the needed information.
Monday, February 11, 2013
Subscribe to:
Posts (Atom)