For algorithm practises, I would recommend
Leetcode,
HackerRank and
GeeksForGeeks. There are quite a few other platforms out there which hopefully I can give them a try.
Leetcode
 |
Leetcode Question page |
 |
Leetcode Note taking function |
I have been using Leetcode mostly and I think it is awesome for the following reasons:
- UI is simple and user-friendly.
- They show our code runtime relative to other submissions.
- It supports most of the popular languages.
- There is a note taking function which comes in handy when you review
- Favorite list function
- Different text editor themes
- They upload new questions almost every week and currently have 700+ questions
In addition, they have a weekly algorithm
contests that users can win some cash and leetcode points.
HackerRank
 |
Hackerrank dashboard |
 |
Hackerrank Question page |
Recently(2016 to present), I notice that quite many companies use
HackerRank for first round
coding assessment. It is definitely a good idea to get familiar with the platform and do the algorithm questions they have to offer. I think you should at least get familiar with it if you are applying for a software developer job.
HackerRank also holds regular coding
contests.
On HackerRank, there is a
cracking the coding interview section where you can practice solving questions from the
Cracking the Coding Interview book.
HackerRank also has a more colorful user interface relatively.
On HackerRank, you have to know how to read files programmatically as the input usually comes from file read. For example, the following.
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
class TestClass {
public static void main(String args[] ) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.parseInt(br.readLine());
int a[] = new int[t];
StringTokenizer st = new StringTokenizer(br.readLine());
int i = 0;
while(st.hasMoreTokens()){
a[i++] = Integer.parseInt(st.nextToken());
}
for (int j = 0; j < t; ++j) {
int num = a[j];
for (int k = 1; k <= num; ++k) {
if (k % 15 == 0)
System.out.println("FizzBuzz");
else if (k % 3 == 0)
System.out.println("Fizz");
else if (k % 5 == 0)
System.out.println("Buzz");
else
System.out.println(k);
}
}
}
}
GeeksForGeeks
 |
GeeksforGeeks Homepage |
 |
GeeksforGeeks Interview Preparation |
GeeksforGeeks has a big collection of questions and recommended solutions. And, I think, it has the longest history among these 3 sites.
GeeksforGeeks contains a lot of popular interview questions. It keeps a good list of trending questions where you can check them out easily.
GeeksforGeeks has an on-site editor for you to compile and test your algorithm but it allows fewer options of languages.
It also has a interview preparation section which I think is a good guide on getting ready for interviews.
Thank you for reading!
Jun
Comments
Post a Comment