Posts

Showing posts from December, 2018

Merge Sort: What is Merge sort and Its complexity

Image
Hi, this is Shubham Mishra, today we will be going to discuss on a topic which deals with the sorting of an array. In my algorithm series, this is the first post but previously I also have written other posts such as  Python game develop using Pygames  and  Data structure and data structure types . The today's topic is Merge sort algorithm. In the series of the algorithm, we will discuss all the possible kind of algorithms and also its complexity with the condition for the use of such algorithms. Let's discuss Merge sort algorithm, its time complexity. Merge sort is a very efficient sorting algorithm with the near-optimal number of comparisons. It is best described using a Recursive algorithm approach . The working of merge sorting algorithm is to splitting and merging of two sorted lists into one sorted list. The recursive algorithm used for merge sort comes under the category of divide and conquer technique. An array of n elements is split around its centre which leads to

PyGame use for Game development

Image
Hey Hi, this is Shubham Mishra, today we will going to look at the tools and tricks to implement and run a desktop game with the help of Pygame library . Before starting I would like to mention basic prerequisite as Python language and it should be installed in your computer. I recommend the latest python version. I used Python 3.7.0 version. If you do not have Pygame module installed then in command prompt just type ' python3 - m pip install - U pygame -- user ' Pygame is one of the popular collection of modules written in python. In the below discussion I will give a working code sample for a game which I named it 'CarShoot'. If you want the complete sources just download it from my  Github repo CarShootGame Once you set up everything now it's time to run the code as 'python Car1.py' and play the game. Pygame : Python Game Development The bar in the upper left corner is the progress bar for the game. The blue car is the Hero and the an

Data Structure and its Types in Computer Science

Image
Hello dear reader, I am Shubham Mishra writing this post to illustrate Data Structure and Data Structure types. For writing this post I have taken the reference from the book 'Data Structure - by Dilip Kumar Sultania'. What is Data: Data is a collection of numbers, alphabets and symbols which represent some information. A computer usually takes input as one form of data and returns output in another form of data. Basically, the data primarily divided into two types, Atomic Data : This data are the non-decomposable entity. These are basically an integer, characters that cannot be further divided. Composite data : It is a sum-up of individual atomic data. It can further be divided into atomic data. Data Structure : Algorithm As shown in the above diagram, 'Date of Birth' is a composite data which can further be divided into three atomic data. Now, let's begin with the actual discussion of today's topic 'Data Types' or 'Data Structures&#