Sunday, March 24, 2019

2 Ways to Check if a String is Rotation of Other in Java - Algorithms

Write a program to check if one String is a rotation of another String is a common coding problem you will find on programming job interviews.  A String is said to be a rotation of another String, if it has the same length, contains the same characters, and they were rotated around one of the characters. For example,  String"bcda" is a rotation of "abcd" but "bdca" is not a rotation of String "abcd". One of the simplest solutions to this interesting problem is first to check if two String has the same length, if not then one String cannot be the rotation of another. If they are of the same length then just create another String by concatenating first String with itself, now check if second String is a substring of this concatenated String or not, if yes, the second String is a rotation of first.

Saturday, March 23, 2019

Difference between Stable and Unstable Sorting Algorithm - MergeSort vs QuickSort

Recently in one on the interview, after some initial questions about sorting algorithms e.g. how do you write QuickSort or difference between QuickSort and MergeSort, the interviewer asked about do you understand the difference between stable and unstable sorting algorithm? This question was new to my reader, so he says, Sorry, never heard about that. The story ended there, and Interviewer moved on to next question but like many of us, my reader went on to find more about unanswered questions and ultimately he asks me what is the meaning of a stable and unstable sorting algorithm? Some of you might be heard about it and many of you might not know about this distinction, I'll try to answer this question in this article.

Wednesday, March 13, 2019

Top 20 String Algorithm Questions from Coding Interviews

In this article, we are going to see top 20 String based coding interview question and their solution to help programmers better prepare for interviews. The string is one of the most important data structure and available in almost every programming language like Java, C, C++, Python, Perl, and Ruby. Though there implement differ the essence remains same like String is NULL terminated character array in C but String is an object in Java, again backed by character array. The string is also available on weekly typed languages like Python and Perl.  This is why you will always find some String based coding question on programming interview.

Top 5 Data Science and Machine Learning Courses to Learn Online - Best of Lot

Many programmers and Computer Science graduates are moving towards Data Science and Machine learning hoping for better pay and career opportunity and there is a reason for it. Data Scientist and Machine Learning Specialist have been ranked the number one job on Glassdoor for last a couple of years and the average salary of a data scientist is over $120,000 in the United States according to Indeed. Data Science is not only a rewarding career in terms of money but also it provides the opportunity to solve some of the world's most interesting problems.  IMHO, that's the main motivation many good programmers are moving towards Data Science, Machine Learning, and Artificial Intelligence.

Monday, March 11, 2019

5 Free Data Structure and Algorithms Books in Java Programming

In the last article, I have shared some of the best data structure and algorithms books for programmers, but those were not free. After that article, I received some feedback about how about sharing free data structure and algorithm books? Fair enough, everybody loves free eBooks, courses and PDFs, don't you? In the past, I have shared a list of free Java programming books, so I had some idea. I did some more research on the internet and checked my collection as well. Fortunately, there are a couple of good Data Structure and Algorithm books which are available for free as a PDF download or for online reading, which is what I am going to share with you all today.

Sunday, March 10, 2019

5 Best books for OCAJP8 Exam 1Z0-808 - Java 8 Certification

It's been more than a couple of years since Java SE 8 was launched on 17th March 2014 and OCAJP 8 exam went live. You might know that in order to become a Java SE 8 certified developer you need to pass two examples, the OCAJP8 (Exam 1Z0-808) and OCPJP8 (Exam 1Z0-809). The first one is called associate level certification and the second one is called professional level certification. When OCAJP8 first comes, there were not enough good books to prepare this exam and many candidates rely heavily on Java 8 books, online courses, and professional exam simulators like Whizlabs and Enthuware, but if you are going to appear for the OCAJP8 exam now, there are no such problems. In this article, you will find some of the best books to prepare for OCAJP8 exams.

Friday, March 8, 2019

10 Technology Jobs for Programmers and Computer Science Engineers to Earn Better Salary

If you are a Computer Science Graduate or someone who is thinking to make a career in the Software development world, or an experienced programmer who is thinking about his next career move but not so sure which field you should go then you have come to the right place. In this article, I will tell you the top 10 highest paying technical jobs you can aim for. All you need is some Programming and Coding experience and a passion for learning. Particularly the Machine learning and Data science field looking very promising for fresh Computer Science graduages, beginners and experienced programmers.

Wednesday, March 6, 2019

Spring Hello World Example in Java using Dependency Injection and XML Configuration

Hello All, In this Spring framework tutorial, you will learn how to write the hello world example in the Spring framework. This should be your first tutorial to start learning Spring framework, as it gets the ball rolling. While coding and running this example, you learn a lot about Spring framework, Spring XSD files, necessary JAR files, and more importantly how Spring framework works. This HelloWorld program in Spring framework is an extension of the classical Java hello world program, which you might have seen earlier. This program is written using the Dependency Injection design pattern by using the Spring Framework's IOC container.  Even though now you can configure Spring dependency using annotations and Java configuration, this example uses a traditional XML way to configure dependencies.

Tuesday, March 5, 2019

How to deal with java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet in Spring Application

The java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet error comes when you deploy a Spring MVC application into Tomcat or Jetty and Servlet container not able to found this class, which usually found in the spring-webmvc.jar file. The DispatcherServlet is the core of Spring MVC framework, it implements the FrontController pattern and intercept all HTTP requests sent to your Web application and subsequently route it to correct controller based upon URL mapping.

Saturday, March 2, 2019

Top 10 Courses to Learn JavaScript in 2019 - Best of Lot

There is no doubt that JavaScript is the most popular programming language at this moment and it's also confirmed by StackOverFlow's 2018 Survey. You can build static websites, web applications, native mobile applications (yes you can do that too), desktop applications and even server-side application in JavaScript. It also makes you a hundred time more employer as there are tons of web development jobs out there. Because of that ore and more developers are learning JavaScript to become a web developer.