Swapping two numbers using Bitwise XOR operator is tricky one and it’s generally asked in interviews. There are other two methods also through which you can swap two numbers.
-
Related Posts (YARPP)
-
Topics
-
-
How to create composer.json file for PHP project.
PHP Composer is a cross-platform package dependency manager that manages package dependency in a PHP project. In Composer file, we can mention the dependencies which we need for our project and it will download them. In this tutorial, You are going to learn how to create a composer.json file for your PHP project.
In this post, let’s discuss a interesting puzzle how to measure 4l water with 3l and 4l jugs.
Problem statement : You have two jugs of capacity 3L and 5L. There is no measurement lines on jug. You need to measure 4L water using 3L and 5L jug. You can use extra water as much as you need. This is one of the favourite puzzle question asked by an interviewer to check your thinking ability.