Skip to main content

Posts

Showing posts from March, 2018

Divide and Conquer

Divide and Conquer Divide and Conquer is an algorithmic paradigm used in many problems and algorithms . Some of the most common algorithms use divide and conquer principle and are highly effective. A Divide and Conquer algorithm solves a problem in 3 steps : Divide: Break the given problem into subproblems of same type. Conquer: Recursively solve these subproblems Combine: Appropriately combine the answers It starts of by breaking down a problem into multiple parts that are simple enough to be solved and then all these subparts are solved individually. For the last part , the algorithm combines all the solutions into one. Some common examples of Divide and Conquer in algorithms are - Binary Search Merge Sort Quick Sort Divide and Conquer is the principle applied to recursion and thus it is a very important technique and is of immense use for programmers. Resources - Wikipedia Technical details

Analysis of Algorithms

Analysis of Algorithms Why do we need to analyse algorithms? Well,every algorithm uses up resources and to figure out which algorithm is best in its class , we need to find out which algorithm takes up minimum resources while producing the desired results . You might wonder : There must be some way else to analyse and compare algorithms like based on the time it takes to execute, but that is a comparison that is machine dependent . The time taken by an algorithm will depend on the processor of the computer its being executed on . Hence , asymptotic analysis of algorithms is the best way to analyse algorithm. How to analyse algorithms? To analyse algorithms we use "Big-O" notation, here is a video by Harvard explaining Asymptotic Notation And here is an incredible text tutorial - Analysis For any queries leave a comment below and if you like the content, hit subscribe on top of the page to stay in the loop for further posts

Why do we need to study algorithms?

Why do we study Algorithms First of all , what exactly are Algorithms? According to wikipedia, Algorithms are defined as - An unambiguous specification of how to solve a class of problems. Well,that is pretty accurate but let me break it down: I would call it a set of instructions to complete a certain task but on the condition that the instructions are precise enough for a computer to follow. Algorithms affect every sphere of our lives, they exist in every domain in our world. Why do we need to study Algorithms ? Here's why, we learn from other people's experience.When we study algorithms, We discover new algorithm design and problem solving techniques We see real life examples of the algorithm techniques by learning different algorithms. Studying Algorithms can help us take our coding skills to the next level as these algorithms provide an efficient way of accomplishing a task.

Project Ideas for Python

Project Ideas for Python Well , python is an extremely versatile language , several different types of projects can be made in python from Graphical user interfaces to Web apps. It being a language with a very extensive standard library has a lot of potential. Project Ideas: Web Development Using python frameworks like Django , Flask , Web2py etc ,a web application or a website can be developed very easily. But to make a project first you will have to learn the framework you choose. Frameworks : Flask - Flask Mega Tutorial Django - Video Tutorial Web2py - Tutorialspoint-Web2py Website Ideas : Notes app Blog To do list Voting App Twitter Clone (fairly complex) Games Python can be used to develop games using pygame . It is very simple to write games in python in pygame and really anyone with basic python skills can get a game up and running in a very short time. Game examples : Flappy Bird 2048 Tic-Tac-Toe Desktop GUI (Graphical User Interface...

How to develop programming logic?

Definite way to develop programming logic Well,first of all what is programming logic exactly? According to me,it is the ability to efficiently apply programming constructs and techniques to solve a problem. So,the question now is, how do you develop programming logic? Almost every programmer starting out gets stuck in this vortex when you learn the basic constructs but have absolutely no idea how to apply them or how to make things with it.Today all your questions will be answered. Programming Techniques, Right now you're probabaly always approaching problems with a brute force ideology. Now: Start researching and learning techniques like - Divide and Conquer Dynamic Programming Backtracking Greedy Algorithms These techniques definitely will make your life easier as they provide you with new tools in your arsenal to approach problems Algorithms and Data Structures Algorithms and data structures are the most core of Computer Science . All the computation...

Python for competitive programming

WHY USE PYTHON FOR COMPETITIVE CODING Well a very good reason is that python is a language which radically cuts short the time you spend writing code ,rather you could spend that time thinking about the logic that is needed for the question. In these kind of competitions speed is necessary,I am not talking about the speed of the language but rather about the speed of the programmer.Python syntax is extremely clutter free and elegant which allows us to not get tangled up in complicated details of a programming language. Python also has a very vast variety of tools in its standard library and these tools can be very well utilised in competitive programming. Here's a list of a whole lot of other reasons why you would want to use python: Common inbuilt functions: Python has common functions like count,min,max,sorted etc.These functions allow you to easily go ahead and skip writing code for these trivial procedures which often prove to be very helpful,rest assured: Pytho...