Postingan

Menampilkan postingan dengan label interview questions

Difference between application/x-www-form-urlencoded and multipart/form-data in HTTP/HTML?

Gambar
Recently in one of the Java web developer interview, one of my readers asked about the difference between x-www-form-url-encoded and multipart/form-data MIME types. In HTTP, there are two ways to send the HTML form data to the server either by using ContentType application/x-www-form-urlencoded or by using multipart/form-data. Even though both can be used to send both text and binary data to the server there is a subtle difference between them. In the case of x-www-form-urlencoded, the whole form data is sent as a long query string. The query string contains name-value pairs separated by & character e.g. field1=value1&field2=value2 etc. It is similar to URL encoding and normal GET request where data is sent on URL, but form data goes inside POST request body and they are encoded like that. Also, both reserved and non-alphanumeric characters are replaced by '%HH', a percent sign and two hexadecimal digits representing the ASCII code of the character e.g. space is repla...

Difference between Stable and Unstable Sorting Algorithm - MergeSort vs QuickSort

Gambar
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. A sorting algorithm is said to be stable if it maintains the relative order of numbers/records in the case of tie i.e. if you need to sort 1 1 2 3 then if you don't change order of those first two ones than your algorithm is stable, but if you swap them then it...

How do you find length of a Singly Linked list using Loop and Recursion

Gambar
Hello guys, here is one of the classical programming questions how do you find the length of a linked list using recursion and without recursion. This is not about the LinkedList class of Java API but the linked list data structure, which is made of nodes that contain both data and address of the next node. In order to calculate the length, you need to count all nodes in the linked list. Since it's a singly linked list you can only move in one direction from the head to tail.  This coding problem was asked to me on my first interview with a multinational Investment bankAfter that, this question has been asked to me on several occasions in other Programming Job Interviews as well. What makes this question interesting is that Java developers are not that great with the data structure as compared to a C++ developer who is evident because of the fundamental difference between these two languages. C++ is more of a system programming language, while Java is more on application programmin...

Top 5 Books for Programming/Coding Interviews - Best of lot

Gambar
If you are preparing for Programming Job interviews and looking for some of the best books for programming questions, then you have come to the right place. In this article, I am going to share a couple of good books to prepare coding, software design, and data structure algorithm questions, which are essential for any coding interviews. Though a programming interview also explores other areas of software development, e.g., the programming language, you would be mainly used in your project, like, C++ or Java. The database and SQL based questions, the operating systems, and UNIX related questions, some of the software design and object-oriented design pattern questions, and much more, but coding based questions form the core of programming interviews. This article solely contains books for coding interviews, but if you are interested in finding good books on other topics, likeconcurrent programming or Java and other topics, then just look at those links and some more I have shared a...

Top 10 Courses to Crack Coding Interviews in 2020 - Must Join Best of Lot

Gambar
To be honest with you, getting your first job is never easy. It is, in fact, the most laborious task, and you need to put your best effort into finding a role in your dream company. Most of the computer science graduates dream of working for Google, Facebook, Amazon, Microsoft, and Apple, but they often not able to clear their rigors coding interviews. The single most important reason for failing those coding job interviews is a lack of knowledge and practice; hence, it becomes increasingly important that you prepare hard in advance. Unfortunately, I learned this little too late after spoiling my chances at Microsoft and Amazon, but you can learn from my experience and prepare better for your programming job interviews. So, the big question comes, how do you prepare for coding/programming job interviews? Which subjects to read? Which questions to solve? How to deal with coding and other technology-related questions? When I was hunting for my first job, there wasn't much help availa...

Top 20 Spring MVC Interview Questions for Java Developers - Answered

Gambar
The Spring MVC framework is one of the most popular Java frameworks for developing web applications. If you have been working in Java and the developing web-based application then there is a good chance that you have already used Spring MVC in your project. In the last decade, it has become the de facto framework for developing Java web applications. Spring MVC is based on classic MVC (Model-View-Controller) design pattern but it is much more than that. It leverages, Spring framework's strength in terms of dependency injection and Inversion of control and promotes loosely coupled architecture, similar to the Spring framework itself. Because of its immense popularity and usefulness, most of the Java development job requires a good knowledge of Spring and Spring MVC. There is a lot of demand for a good Java developer with good knowledge and experience in Spring and Spring MVC. One way to prepare yourself for s...

Top 20 Algorithms Interview Questions for Programmers and Software Engineers

Gambar
Hello All, If you are preparing for Programming job interviews or looking for a new job then you know that it's not an easy process. You got to be lucky to get the call and make to the first round of interview at any stage of your career but it is even more difficult at the beginner level when you are searching for your first job. That's why you can't just take your chance lightly. You got to be prepared to grab that chance and for that, you must know that is expected from you on the interview. What is asked, what topics should you prepare, etc? I have blogged a lot about what you can find helpful articles in this blog but to recap let me tell you that apart from data structure questions, System Design Questions, and Programming language-specific questions like Java or Scala, most of the programming job interviews also ask algorithm based questions. These are based upon common searching and sorting algorithms likebinary search,graph algorithms, etc,. It’s important that you...

Top 20 Spring and REST Interview Questions Answers for Java/JEE Programmers

Gambar
Hello guys, I have been sharing a lot of REST with Spring tutorials from last a couple of weeks and today, I am going to share some of the frequently asked Spring and REST interview questions to Java developers applying for Web developer roles. Since Spring Framework is the most popular and the standard framework for developing Java web application and RESTful Web Services, a good knowledge of Spring core and Spring MVC is expected from any senior Java developer, but if the job description mention about REST and Web Services, you also need to be aware of how to develop RESTful Web Services using Spring Framework. From Spring 3.1, the framework has been enhanced a lot to support many features needed for RESTFul API out-of-the-box like HTTPMessageConverter can convert your HTTP response to JSON or XML by just detecting relevant library in classpaths like Jackson and JAXB. Spring also provides customized annotations for RESTful Web Services like @RestController which can make your C...