Problem solving with algorithms and data structures review

Posted by Marta on February 1, 2023 Viewed 3071 times

Card image cap

“Problem solving with algorithms and data structures” is an excellent book that I will highly recommend to read if you are serious about programming. It will give you an excellent overall understanding of what computer science is and how data structures and algorithms fit into that.

Below you can find an overview of the topics covered in the “Problem Solving with algorithms and data structures” book. Keep in mind this article is just an introduction, and I strongly advise you to read the book since it goes into more in-depth details. 

A better understanding of algorithms and data structures will improve your problem-solving skills, and consequently become a better computer scientist and programmer.

Programming and the way we think about programming have considerably changed over the last years. Many new platforms, programming languages, advances in hardware have emerged. However, basic problem-solving fundamentals have remained almost unchanged. Problem-solving means take a problem and find a step-by-step list of instructions that solve the problem.

Here are some of the topics that the book covers.

What is Computer Science?

In the book, you will get a clear explanation of what computer science is. The main idea is that problem-solving is the key and central subject of computer science. As a computer scientist, your main goal is to create algorithms. In other words, given a problem, come up with a step-by-step list of instructions for solving the problem. That’s what computer science is all about. Create a step-by-step solution to problems.

Computer science also includes the study of abstraction. Abstraction is a difficult concept to explain. Overall it means separating the logical and physical aspects.

For example, think about a washing machine. A washing machine is made up of many physical components. However, we don’t need to know anything about a washing machine’s mechanics and physical aspects to interact with it. Just pushing the buttons at the front panel, which is the washing machine’s interface, is enough together it works. In other words, all physical aspects are abstracted by creating an interface. This interface defines how to interact with the washing machine.

What is programming?

The next key topic covers programming. Programming means encoding an algorithm in a given programming language like Python or Java, using all notations and rules the language provides so that the computer can execute it. Programming is one of the tasks of a computer scientist. Once you have created an algorithm to solve the problem, the algorithm should translate into a programming language.

There is a lot of confusion around what’s the difference between a software engineer and a programmer. And I think the introduction of this book states the difference quite clearly. The key is that a software engineer will come up with a generic and workable solution. While programming means coding a given solution. Probably the confusion comes from the fact that, in a real environment, a software engineer usually carry out both roles, coming up with a solution to the problem and then encoding the solution into a programming language.

What are the data structures?

Data Structures gives you a way of representing collections of simple data types. For instance, a simple data type can be an integer. If you have 100 integers you need to manipulate, you could create 100 variables; however, managing 100 variables will be a nightmare. So instead, you can use a data structure to hold these numbers and make your algorithms much simpler. 

In the book, you will learn about the basic data structures, including lists, stacks, queues, and node-based structures such as trees and the different types of trees. There are code snippets throughout the book, so you can paste them into your IDE and try things out.

Top 6 data structures you show know simply explained

Python assignment to practice data structures

Why study algorithms?

Another essential aspect covered in the book is the algorithms. There are many ways to solve the same problem, and as a consequence, many possible algorithms for the same problem. How would you choose the algorithm that best fits your problem? You will need some mechanism that enables you to compare these algorithms. Then you can answer questions like which one is faster? Which one uses less memory? In the second chapter, you study algorithms and learn analysis techniques that will help you to compare algorithms. One of the main methods is Big-O notation.

It also includes a detailed and straightforward explanation of the main search and sort algorithms that are important to know as a developer and how to implement them in Python. These are questions that come up during the interviewing process for companies like Google, Amazon, Facebook, etc.

You must be aware of this mechanisms. Why? To avoid reinventing the wheel. Companies usually want to make sure that you are aware of the well-known algorithms in computer science. This way, when you bump into similar problems, you leverage these concepts rather than reinventing the wheel. Most complex generic problems in computer science were solved already, therefore, knowing these solutions can save you a lot of time.

Learn more about Big-O Notation

Python basic review

The book will give a quick review of python, focusing on the essentials stuff that you need to understand to write algorithms. Variables, If statements, Control statements, and functions, explaining why they are essential.

What is JSON, and why to use it?

Another topic covered the context in which JSON was introduced. There are many programs in the network, all written in different languages. A few standard formats emerged to allow easy communication and share data: XML, SOAP, YAML, and JSON.

Summary

The main reason why I recommend this book is that it covers the key concepts about computer science, which are likely to come up when you go for an interview, at least for big companies. Plus, all explained understandably, with examples in Python and exercises

Project-Based Programming Introduction

Steady pace book with lots of worked examples. Starting with the basics, and moving to projects, data visualisation, and web applications

100% Recommended book for Java Beginners

Unique lay-out and teaching programming style helping new concepts stick in your memory

90 Specific Ways to Write Better Python

Great guide for those who want to improve their skills when writing python code. Easy to understand. Many practical examples

Grow Your Java skills as a developer

Perfect Boook for anyone who has an alright knowledge of Java and wants to take it to the next level.

Write Code as a Professional Developer

Excellent read for anyone who already know how to program and want to learn Best Practices

Every Developer should read this

Perfect book for anyone transitioning into the mid/mid-senior developer level

Great preparation for interviews

Great book and probably the best way to practice for interview. Some really good information on how to perform an interview. Code Example in Java