Introduction to the Course

Get a brief overview of the course, its prerequisites, intended audience, and learning outcomes.

Why algorithms

What this course has to offer, intended audience, prerequisites.

Algorithms are the building blocks of computer science, enabling us to solve complex problems and optimize various processes. This course will be a comprehensive guide that dives deep into the study of algorithms. By understanding algorithms, you’ll gain essential problem-solving skills and learn how to design efficient solutions. Whether you’re a student, programmer, or simply curious about the inner workings of algorithms, this course will provide you with a solid foundation.

“Algorithms” covers a wide range of topics, including data structures, graph algorithms, dynamic programming, and much more. Through clear explanations and mathematical analysis, we present the concepts in a systematic manner. It includes numerous examples and challenges to reinforce your understanding and provide hands-on experience in implementing and analyzing algorithms.

In this course, you’ll find a wealth of knowledge on topics such as network flows, linear programming, approximation algorithms, and randomized algorithms. The course explores the intricacies of these subjects, providing insights into their underlying principles and practical applications. Additionally, it explores advanced techniques like computational geometry, parallel algorithms, and online algorithms, offering a comprehensive exploration of the diverse field of algorithmic problem-solving.

This course is designed to cater to a broad range of audiences interested in algorithms and data structures. Whether you are an undergraduate, a graduate student, or someone who wants to learn the basics of algorithms, this course provides a solid foundation in algorithm design and analysis. Additionally, programmers and professionals seeking to enhance their algorithmic knowledge and problem-solving skills will find the course valuable. The content is presented in a manner that is accessible and easily understandable by individuals with prior knowledge of algorithms, making it an excellent resource for self-study or as a supplementary text in algorithm courses.

Before diving into the course, it is beneficial to have some foundational knowledge and skills. A basic understanding of programming concepts and proficiency in a programming language, such as C++, Java, or Python, will help you grasp the implementation aspects of the algorithms discussed in the course. Familiarity with mathematical concepts, including discrete mathematics, logic, and elementary calculus, is also advantageous as it forms the basis for the analysis and proofs presented in the course. Additionally, a solid understanding of data structures, such as arrays, linked lists, trees, and graphs, will enable you to better comprehend the algorithms and their underlying principles. While not mandatory, prior exposure to introductory computer science can provide a helpful background for engaging with the material covered in “Algorithms” effectively. However, the course also offers explanations and examples to accommodate readers with varying levels of prior knowledge.

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy

Open and Interactive Learning Resources for Algorithmic Problem Solving

  • Conference paper
  • First Online: 11 August 2020
  • Cite this conference paper

hands on algorithmic problem solving

  • João F. Ferreira 25 &
  • Alexandra Mendes 26 , 27  

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 12233))

Included in the following conference series:

  • International Symposium on Formal Methods

379 Accesses

1 Citations

Algorithmic problem solving is a way of approaching and solving problems by using the advances that have been made in the principles of correct-by-construction algorithm design. The approach has been taught at first-year undergraduate level since September 2003 and, since then, a substantial amount of learning materials have been developed. However, the existing materials are distributed in a conventional and static way (e.g. as a textbook and as several documents in PDF format available online), not leveraging the capabilities provided by modern collaborative and open-source platforms.

In this paper, we propose the creation of an online, open-source repository of interactive learning materials on algorithmic problem solving. We show how the existing framework Mathigon can be used to support such a repository. By being open and hosted on a platform such as GitHub, the repository enables collaboration and anyone can create and submit new material. Furthermore, by making the material interactive, we hope to encourage engagement with and a better understanding of the materials.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
  • Available as EPUB and PDF
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

hands on algorithmic problem solving

A Flipped Design of Learning Resources for a Course on Algorithms and Data Structures

hands on algorithmic problem solving

From Mathematical Problem Solving to Geocaching: A Journey Inspired by My Encounter with Jeremy Kilpatrick

hands on algorithmic problem solving

Introduction

Mathigon’s website: https://mathigon.org (accessed 18 July 2019).

Wikipedia link: https://en.wikipedia.org/wiki/River_crossing_puzzle (accessed 18 July 2019).

The restatement of the problem and the subsequent two paragraphs are extracted from [ 1 ].

The implementation of the puzzle that we used was created by Victor Ribeiro ( https://github.com/victorqribeiro/bridge ).

See the repository textbooks (folder content/river-crossing ) in https://github.com/algprobsolving .

MyScript webpage: https://www.myscript.com .

Backhouse, R.: Algorithmic Problem Solving. Wiley, New York (2011)

MATH   Google Scholar  

Backhouse, R., Ferreira, J.F.: On Euclid’s algorithm and elementary number theory. Sci. Comput. Programm. 76 (3), 160–180 (2011). https://doi.org/10.1016/j.scico.2010.05.006

Article   MathSciNet   MATH   Google Scholar  

Backhouse, R., Ferreira, J.F.: Recounting the rationals: twice!. In: Audebaud, P., Paulin-Mohring, C. (eds.) MPC 2008. LNCS, vol. 5133, pp. 79–91. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-70594-9_6

Chapter   Google Scholar  

Biggs, J., Tang, C.: Teaching for Quality Learning at University: What the Student does (Society for Research Into Higher Education), 4th edn. Open Univ. Press, Buckingham (2011)

Google Scholar  

Chickering, A.W., Gamson, Z.F.: Seven principles for good practice in undergraduate education. AAHE Bull. 3 , 7 (1987)

Dijkstra, E.W.: Pruning the search tree, January 1997. http://www.cs.utexas.edu/users/EWD/ewd12xx/EWD1255.PDF

Ferreira, J.F.: Designing an algorithmic proof of the two-squares theorem. In: Bolduc, C., Desharnais, J., Ktari, B. (eds.) MPC 2010. LNCS, vol. 6120, pp. 140–156. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-13321-3_10

Ferreira, J.F.: Principles and applications of algorithmic problem solving. Ph.D. thesis, School of Computer Science, University of Nottingham (2010)

Ferreira, J.F., Mendes, A.: Students’ feedback on teaching mathematics through the calculational method. In: 2009 39th IEEE Frontiers in Education Conference, pp. 1–6. IEEE (2009)

Ferreira, J.F., Mendes, A.: The magic of algorithm design and analysis: teaching algorithmic skills using magic card tricks. In: ACM ITiCSE (2014)

Ferreira, J.F., Mendes, A., Backhouse, R., Barbosa, L.S.: Which mathematics for the information society? In: Gibbons, J., Oliveira, J.N. (eds.) TFM 2009. LNCS, vol. 5846, pp. 39–56. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-04912-5_4

Ferreira, J., et al.: Logic training through algorithmic problem solving. In: Blackburn, P., van Ditmarsch, H., Manzano, M., Soler-Toscano, F. (eds.) TICTTL 2011. LNCS (LNAI), vol. 6680, pp. 62–69. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-21350-2_8

Hoare, T., Mendes, A., Ferreira, J.F.: Logic, algebra, and geometry at the foundation of computer science. In: Dongol, B., Petre, L., Smith, G. (eds.) FMTea 2019. LNCS, vol. 11758, pp. 3–20. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-32441-4_1

Mendes, A.: Structured editing of handwritten mathematics. Ph.D. thesis, School of Computer Science, University of Nottingham, UK (2012)

Mendes, A., Backhouse, R., Ferreira, J.F.: Structure editing of handwritten mathematics: improving the computer support for the calculational method. In: ACM ITS (2014). http://doi.acm.org/10.1145/2669485.2669495

Download references

Acknowledgments

This work is partially financed by National Funds through the Portuguese funding agency, FCT - Fundação para a Ciência e a Tecnologia through the project: UID/EEA/50014/2019.

Author information

Authors and affiliations.

INESC-ID & Instituto Superior Técnico, University of Lisbon, Lisbon, Portugal

João F. Ferreira

Department of Informatics, Universidade da Beira Interior, Covilhã, Portugal

Alexandra Mendes

HASLab, INESC TEC, Porto, Portugal

You can also search for this author in PubMed   Google Scholar

Corresponding author

Correspondence to João F. Ferreira .

Editor information

Editors and affiliations.

McMaster University, Hamilton, ON, Canada

Emil Sekerinski

University of Porto, Porto, Portugal

Nelma Moreira

University of Minho, Braga, Portugal

José N. Oliveira

Argo Ai, Munich, Germany

Daniel Ratiu

University of Pisa, Pisa, Italy

Riccardo Guidotti

University of Liverpool, Liverpool, UK

Marie Farrell

Matt Luckcuck

University of Exeter, Exeter, UK

Diego Marmsoler

José Campos

University of Newcastle, Newcastle upon Tyne, UK

Troy Astarte

Claude Bernard University, Lyon, France

Laure Gonnord

Nazarbayev University, Nur-Sultan, Kazakhstan

Antonio Cerone

University of Surrey, Guildford, UK

Brijesh Dongol

University of Giessen, Giessen, Germany

Martin Kutrib

University of Lisbon, Lisbon, Portugal

Pedro Monteiro

Airbus Operations S.A.S., Toulouse, France

David Delmas

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Cite this paper.

Ferreira, J.F., Mendes, A. (2020). Open and Interactive Learning Resources for Algorithmic Problem Solving. In: Sekerinski, E., et al. Formal Methods. FM 2019 International Workshops. FM 2019. Lecture Notes in Computer Science(), vol 12233. Springer, Cham. https://doi.org/10.1007/978-3-030-54997-8_13

Download citation

DOI : https://doi.org/10.1007/978-3-030-54997-8_13

Published : 11 August 2020

Publisher Name : Springer, Cham

Print ISBN : 978-3-030-54996-1

Online ISBN : 978-3-030-54997-8

eBook Packages : Computer Science Computer Science (R0)

Share this paper

Anyone you share the following link with will be able to read this content:

Sorry, a shareable link is not currently available for this article.

Provided by the Springer Nature SharedIt content-sharing initiative

  • Publish with us

Policies and ethics

  • Find a journal
  • Track your research

hands on algorithmic problem solving

  • Computers & Technology
  • Programming

Amazon prime logo

Enjoy fast, free delivery, exclusive deals, and award-winning movies & TV shows with Prime Try Prime and start saving today with fast, free delivery

Amazon Prime includes:

Fast, FREE Delivery is available to Prime members. To join, select "Try Amazon Prime and start saving today with Fast, FREE Delivery" below the Add to Cart button.

  • Cardmembers earn 5% Back at Amazon.com with a Prime Credit Card.
  • Unlimited Free Two-Day Delivery
  • Streaming of thousands of movies and TV shows with limited ads on Prime Video.
  • A Kindle book to borrow for free each month - with no due dates
  • Listen to over 2 million songs and hundreds of playlists
  • Unlimited photo storage with anywhere access

Important:  Your credit card will NOT be charged when you start your free trial or if you cancel during the trial period. If you're happy with Amazon Prime, do nothing. At the end of the free trial, your membership will automatically upgrade to a monthly membership.

Buy new: .savingPriceOverride { color:#CC0C39!important; font-weight: 300!important; } .reinventMobileHeaderPrice { font-weight: 400; } #apex_offerDisplay_mobile_feature_div .reinventPriceSavingsPercentageMargin, #apex_offerDisplay_mobile_feature_div .reinventPricePriceToPayMargin { margin-right: 4px; } -31% $34.54 $ 34 . 54 FREE delivery Wednesday, May 29 on orders shipped by Amazon over $35 Ships from: Amazon.com Sold by: Amazon.com

Return this item for free.

Free returns are available for the shipping address you chose. You can return the item for any reason in new and unused condition: no shipping charges

  • Go to your orders and start the return
  • Select the return method

Save with Used - Good .savingPriceOverride { color:#CC0C39!important; font-weight: 300!important; } .reinventMobileHeaderPrice { font-weight: 400; } #apex_offerDisplay_mobile_feature_div .reinventPriceSavingsPercentageMargin, #apex_offerDisplay_mobile_feature_div .reinventPricePriceToPayMargin { margin-right: 4px; } $18.35 $ 18 . 35 FREE delivery Wednesday, May 29 on orders shipped by Amazon over $35 Ships from: Amazon Sold by: eCampus_

Kindle app logo image

Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required .

Read instantly on your browser with Kindle for Web.

Using your mobile phone camera - scan the code below and download the Kindle app.

QR code to download the Kindle App

Follow the author

Daniel Zingaro

Image Unavailable

Algorithmic Thinking: A Problem-Based Introduction

  • To view this video download Flash Player

Algorithmic Thinking: A Problem-Based Introduction

There is a newer edition of this item:.

Algorithmic Thinking, 2nd Edition: Learn Algorithms to Level Up Your Coding Skills

Purchase options and add-ons

  • The breadth-first search algorithm to find the optimal way to play a board game or find the best way to translate a book
  • Dijkstra's algorithm to determine how many mice can exit a maze or the number of fastest routes between two locations
  • The union-find data structure to answer questions about connections in a social network or determine who are friends or enemies
  • The heap data structure to determine the amount of money given away in a promotion
  • The hash-table data structure to determine whether snowflakes are unique or identify compound words in a dictionary
  • ISBN-10 1718500807
  • ISBN-13 978-1718500808
  • Publisher No Starch Press
  • Publication date December 15, 2020
  • Language English
  • Dimensions 7.05 x 0.93 x 9.31 inches
  • Print length 408 pages
  • See all details

Amazon First Reads | Editors' picks at exclusive prices

Frequently bought together

Algorithmic Thinking: A Problem-Based Introduction

Similar items that may deliver to you quickly

Data Structures the Fun Way: An Amusing Adventure with Coffee-Filled Examples

From the Publisher

Copy of Algorithmic Thinking on black background with No Starch Press logo

About the Author

Dr. Daniel Zingaro is an assistant teaching professor of computer science and award-winning teacher at the University of Toronto. His main area of research is computer science education research, where he studies how students learn (and sometimes don’t learn) computer science material.

Who Should Read This Book

This book is for any programmer who wants to learn how to solve tough problems. You’ll learn many data structures and algorithms, their benefits, the types of problems they can help you solve, and how to implement them.

No Starch Press logo. A black circle with a white iron with a star in the center

About the Publisher

No Starch Press has published the finest in geek entertainment since 1994, creating both timely and timeless titles like Python Crash Course, Python for Kids, How Linux Works, and Hacking: The Art of Exploitation. An independent, San Francisco-based publishing company, No Starch Press focuses on a curated list of well-crafted books that make a difference. They publish on many topics, including computer programming, cybersecurity, operating systems, and LEGO. The titles have personality, the authors are passionate experts, and all the content goes through extensive editorial and technical reviews. Long known for its fun, fearless approach to technology, No Starch Press has earned wide support from STEM enthusiasts worldwide.

Editorial Reviews

Product details.

  • Publisher ‏ : ‎ No Starch Press (December 15, 2020)
  • Language ‏ : ‎ English
  • Paperback ‏ : ‎ 408 pages
  • ISBN-10 ‏ : ‎ 1718500807
  • ISBN-13 ‏ : ‎ 978-1718500808
  • Item Weight ‏ : ‎ 2.31 pounds
  • Dimensions ‏ : ‎ 7.05 x 0.93 x 9.31 inches
  • #116 in C Programming Language
  • #844 in Software Development (Books)
  • #23,259 in Unknown

About the author

Daniel zingaro.

Dr. Daniel Zingaro is an associate teaching professor of computer science and award-winning teacher at the University of Toronto. His main area of research is computer science education, where he studies the ways that students learn computer science material.

Customer reviews

Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.

To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.

  • Sort reviews by Top reviews Most recent Top reviews

Top reviews from the United States

There was a problem filtering reviews right now. please try again later..

hands on algorithmic problem solving

Top reviews from other countries

hands on algorithmic problem solving

  • Amazon Newsletter
  • About Amazon
  • Accessibility
  • Sustainability
  • Press Center
  • Investor Relations
  • Amazon Devices
  • Amazon Science
  • Sell on Amazon
  • Sell apps on Amazon
  • Supply to Amazon
  • Protect & Build Your Brand
  • Become an Affiliate
  • Become a Delivery Driver
  • Start a Package Delivery Business
  • Advertise Your Products
  • Self-Publish with Us
  • Become an Amazon Hub Partner
  • › See More Ways to Make Money
  • Amazon Visa
  • Amazon Store Card
  • Amazon Secured Card
  • Amazon Business Card
  • Shop with Points
  • Credit Card Marketplace
  • Reload Your Balance
  • Amazon Currency Converter
  • Your Account
  • Your Orders
  • Shipping Rates & Policies
  • Amazon Prime
  • Returns & Replacements
  • Manage Your Content and Devices
  • Recalls and Product Safety Alerts
  • Conditions of Use
  • Privacy Notice
  • Consumer Health Data Privacy Disclosure
  • Your Ads Privacy Choices

Smart. Open. Grounded. Inventive. Read our Ideas Made to Matter.

Which program is right for you?

MIT Sloan Campus life

Through intellectual rigor and experiential learning, this full-time, two-year MBA program develops leaders who make a difference in the world.

A rigorous, hands-on program that prepares adaptive problem solvers for premier finance careers.

A 12-month program focused on applying the tools of modern data science, optimization and machine learning to solve real-world business problems.

Earn your MBA and SM in engineering with this transformative two-year program.

Combine an international MBA with a deep dive into management science. A special opportunity for partner and affiliate schools only.

A doctoral program that produces outstanding scholars who are leading in their fields of research.

Bring a business perspective to your technical and quantitative expertise with a bachelor’s degree in management, business analytics, or finance.

A joint program for mid-career professionals that integrates engineering and systems thinking. Earn your master’s degree in engineering and management.

An interdisciplinary program that combines engineering, management, and design, leading to a master’s degree in engineering and management.

Executive Programs

A full-time MBA program for mid-career leaders eager to dedicate one year of discovery for a lifetime of impact.

This 20-month MBA program equips experienced executives to enhance their impact on their organizations and the world.

Non-degree programs for senior executives and high-potential managers.

A non-degree, customizable program for mid-career professionals.

Why companies are turning to ‘citizen developers’

‘Climate capitalism’ can help scale green solutions

New leadership and management thinking from MIT experts

Credit: Alejandro Giraldo

Ideas Made to Matter

How to use algorithms to solve everyday problems

Kara Baskin

May 8, 2017

How can I navigate the grocery store quickly? Why doesn’t anyone like my Facebook status? How can I alphabetize my bookshelves in a hurry? Apple data visualizer and MIT System Design and Management graduate Ali Almossawi solves these common dilemmas and more in his new book, “ Bad Choices: How Algorithms Can Help You Think Smarter and Live Happier ,” a quirky, illustrated guide to algorithmic thinking. 

For the uninitiated: What is an algorithm? And how can algorithms help us to think smarter?

An algorithm is a process with unambiguous steps that has a beginning and an end, and does something useful.

Algorithmic thinking is taking a step back and asking, “If it’s the case that algorithms are so useful in computing to achieve predictability, might they also be useful in everyday life, when it comes to, say, deciding between alternative ways of solving a problem or completing a task?” In all cases, we optimize for efficiency: We care about time or space.

Note the mention of “deciding between.” Computer scientists do that all the time, and I was convinced that the tools they use to evaluate competing algorithms would be of interest to a broad audience.

Why did you write this book, and who can benefit from it?

All the books I came across that tried to introduce computer science involved coding. My approach to making algorithms compelling was focusing on comparisons. I take algorithms and put them in a scene from everyday life, such as matching socks from a pile, putting books on a shelf, remembering things, driving from one point to another, or cutting an onion. These activities can be mapped to one or more fundamental algorithms, which form the basis for the field of computing and have far-reaching applications and uses.

I wrote the book with two audiences in mind. One, anyone, be it a learner or an educator, who is interested in computer science and wants an engaging and lighthearted, but not a dumbed-down, introduction to the field. Two, anyone who is already familiar with the field and wants to experience a way of explaining some of the fundamental concepts in computer science differently than how they’re taught.

I’m going to the grocery store and only have 15 minutes. What do I do?

Do you know what the grocery store looks like ahead of time? If you know what it looks like, it determines your list. How do you prioritize things on your list? Order the items in a way that allows you to avoid walking down the same aisles twice.

For me, the intriguing thing is that the grocery store is a scene from everyday life that I can use as a launch pad to talk about various related topics, like priority queues and graphs and hashing. For instance, what is the most efficient way for a machine to store a prioritized list, and what happens when the equivalent of you scratching an item from a list happens in the machine’s list? How is a store analogous to a graph (an abstraction in computer science and mathematics that defines how things are connected), and how is navigating the aisles in a store analogous to traversing a graph?

Nobody follows me on Instagram. How do I get more followers?

The concept of links and networks, which I cover in Chapter 6, is relevant here. It’s much easier to get to people whom you might be interested in and who might be interested in you if you can start within the ball of links that connects those people, rather than starting at a random spot.

You mention Instagram: There, the hashtag is one way to enter that ball of links. Tag your photos, engage with users who tag their photos with the same hashtags, and you should be on your way to stardom.

What are the secret ingredients of a successful Facebook post?

I’ve posted things on social media that have died a sad death and then posted the same thing at a later date that somehow did great. Again, if we think of it in terms that are relevant to algorithms, we’d say that the challenge with making something go viral is really getting that first spark. And to get that first spark, a person who is connected to the largest number of people who are likely to engage with that post, needs to share it.

With [my first book], “Bad Arguments,” I spent a month pouring close to $5,000 into advertising for that project with moderate results. And then one science journalist with a large audience wrote about it, and the project took off and hasn’t stopped since.

What problems do you wish you could solve via algorithm but can’t?

When we care about efficiency, thinking in terms of algorithms is useful. There are cases when that’s not the quality we want to optimize for — for instance, learning or love. I walk for several miles every day, all throughout the city, as I find it relaxing. I’ve never asked myself, “What’s the most efficient way I can traverse the streets of San Francisco?” It’s not relevant to my objective.

Algorithms are a great way of thinking about efficiency, but the question has to be, “What approach can you optimize for that objective?” That’s what worries me about self-help: Books give you a silver bullet for doing everything “right” but leave out all the nuances that make us different. What works for you might not work for me.

Which companies use algorithms well?

When you read that the overwhelming majority of the shows that users of, say, Netflix, watch are due to Netflix’s recommendation engine, you know they’re doing something right.

Related Articles

A stack of jeans with network/AI imagery overlayed on top

  • School Guide
  • Class 8 Syllabus
  • Maths Notes Class 8
  • Science Notes Class 8
  • History Notes Class 8
  • Geography Notes Class 8
  • Civics Notes Class 8
  • NCERT Soln. Class 8 Maths
  • RD Sharma Soln. Class 8
  • Math Formulas Class 8

How to Use Algorithms to Solve Problems?

  • How to use Chat-GPT to solve Coding Problems?
  • Wicked Problems and How to Solve Them?
  • How to implement Genetic Algorithm using PyTorch
  • Best Data Structures and Algorithms Books
  • How to improve your DSA skills?
  • Tricks To Solve Age-Based Problems
  • The Role of Algorithms in Computing
  • Most important type of Algorithms
  • How to Identify & Solve Binary Search Problems?
  • Quiz on Algorithms | DSA MCQs
  • Introduction to Beam Search Algorithm
  • Algorithms Quiz | Sudo Placement [1.8] | Question 5
  • Top 50 Problems on Recursion Algorithm asked in SDE Interviews
  • What are Logical Puzzles And How to Solve them?
  • What is Algorithm | Introduction to Algorithms
  • Top 10 Algorithms in Interview Questions
  • Data Structures & Algorithms Guide for Developers
  • Top 50 Binary Search Tree Coding Problems for Interviews
  • Top 20 Greedy Algorithms Interview Questions

An algorithm is a process or set of rules which must be followed to complete a particular task. This is basically the step-by-step procedure to complete any task. All the tasks are followed a particular algorithm, from making a cup of tea to make high scalable software. This is the way to divide a task into several parts. If we draw an algorithm to complete a task then the task will be easier to complete.

The algorithm is used for,

  • To develop a framework for instructing computers.
  • Introduced notation of basic functions to perform basic tasks.
  • For defining and describing a big problem in small parts, so that it is very easy to execute.

Characteristics of Algorithm

  • An algorithm should be defined clearly.
  • An algorithm should produce at least one output.
  • An algorithm should have zero or more inputs.
  • An algorithm should be executed and finished in finite number of steps.
  • An algorithm should be basic and easy to perform.
  • Each step started with a specific indentation like, “Step-1”,
  • There must be “Start” as the first step and “End” as the last step of the algorithm.

Let’s take an example to make a cup of tea,

Step 1: Start

Step 2: Take some water in a bowl.

Step 3: Put the water on a gas burner .

Step 4: Turn on the gas burner 

Step 5: Wait for some time until the water is boiled.  

Step 6: Add some tea leaves to the water according to the requirement.

Step 7: Then again wait for some time until the water is getting colorful as tea.

Step 8: Then add some sugar according to taste.

Step 9: Again wait for some time until the sugar is melted.

Step 10: Turn off the gas burner and serve the tea in cups with biscuits.

Step 11: End

Here is an algorithm for making a cup of tea. This is the same for computer science problems.

There are some basics steps to make an algorithm:

  • Start – Start the algorithm
  • Input – Take the input for values in which the algorithm will execute.
  • Conditions – Perform some conditions on the inputs to get the desired output.
  • Output – Printing the outputs.
  • End – End the execution.

Let’s take some examples of algorithms for computer science problems.

Example 1. Swap two numbers with a third variable  

Step 1: Start Step 2: Take 2 numbers as input. Step 3: Declare another variable as “temp”. Step 4: Store the first variable to “temp”. Step 5: Store the second variable to the First variable. Step 6: Store the “temp” variable to the 2nd variable. Step 7: Print the First and second variables. Step 8: End

Example 2. Find the area of a rectangle

Step 1: Start Step 2: Take the Height and Width of the rectangle as input. Step 3: Declare a variable as “area” Step 4: Multiply Height and Width Step 5: Store the multiplication to “Area”, (its look like area = Height x Width) Step 6: Print “area”; Step 7: End

Example 3. Find the greatest between 3 numbers.

Step 1: Start Step 2: Take 3 numbers as input, say A, B, and C. Step 3: Check if(A>B and A>C) Step 4: Then A is greater Step 5: Print A Step 6 : Else Step 7: Check if(B>A and B>C) Step 8: Then B is greater Step 9: Print B Step 10: Else C is greater Step 11 : Print C Step 12: End

Advantages of Algorithm

  • An algorithm uses a definite procedure.
  • It is easy to understand because it is a step-by-step definition.
  • The algorithm is easy to debug if there is any error happens.
  • It is not dependent on any programming language
  • It is easier for a programmer to convert it into an actual program because the algorithm divides a problem into smaller parts.

Disadvantages of Algorithms

  • An algorithm is Time-consuming, there is specific time complexity for different algorithms.
  • Large tasks are difficult to solve in Algorithms because the time complexity may be higher, so programmers have to find a good efficient way to solve that task.
  • Looping and branching are difficult to define in algorithms.

Please Login to comment...

Similar reads.

  • School Learning
  • School Programming

Improve your Coding Skills with Practice

 alt=

What kind of Experience do you want to share?

Navigation Menu

Search code, repositories, users, issues, pull requests..., provide feedback.

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly.

To see all available qualifiers, see our documentation .

  • Notifications

Open source content from a book in progress, Hands-on Algorithmic Problem Solving

ashishpatel26/Algorithms-and-Coding-Interviews

Folders and files, repository files navigation, hands-on algorithmic problem solving, creates passion and confidence from mastering algorithmic problem solving and problem patterns of real interview questions.

alt text

The purpose of the book is to guide the reader's preparation to crack the coding interviews. Preparing for the coding interview, not easy! Cracking the coding interivew? Like impossible for most of us! Luck does play a slight role sometimes in the outcome. So, just treating it as a learning process. No matter what the result is, there will be no regret.

Computer Science is really not just computer science. It is a combination of all fields; our normal interview problems fall into the eumerative combinatorics and our computer vision mostly is related to Linear Algebra. What really matters is our passion about learning more and applying it to solve real-life problems. How about forgetting about cracking the coding interviews, and just simply enjoy a ride that trying to seek the soul of the programming world. I'm just like you, I love to learn and I love to write and try to do a better job. No matter how much time it takes, because I love learning it!

There are plenty of books out there focusing on either teaching algorithmic knowledge ( Introduction to Algorithms , Algorithmic Problem Solving , etc) or introducing interview process and solving interview problems( Cracking the Coding Interview --seriously, you are not likely to crack any interviews with this book, haha!, Coding Interview Questions , etc), but barely any that combines the two. This is a book designed to make up this role in the categorization; learning the algorithmic problem solving by analyzing and practicing interview problems -- a reciprocal relationship that makes 1+1=4: Algorithms, Interviews, Passion, and Confidence.

This is NOT a book that provides hiring statistic of each company or gives the reader quick tricks in order to pass a few coding interviews(T'm not good with NLP, 'cause I'm a computer vision person). Its purpose is to show you the beauty of the algorithimc problem solving in the hope that you will be more passionate and condifent about software engineering; the interview questions just set up a play ground where we strengthen what we learn. A strong candidate would be apt to sleep well before interviews, walk into the interviews and discuss his or her findings about the question from all possible angles and program the best solution for on the white-board. The interviews shall be a setting the interviewers and interviewees both have a nice and happy talk; learning from each other instead of a one-way relation -- tester and testee.

Content Format

Related content will be posted in the form of medium publication and as a book in pdf instead of directly using markdown for better visual appearance and organization.

Table of Contents

Warm up: abstract data structures and tools.

  • Abstract Data Structures
  • Discrete Programming
  • Recurrence Relation

Get Started: Programming and Python Data Structures

  • Iteration and Recursion
  • Bit Manipulation
  • Python Data Structures
PDF source code

Core Principles: Algorithm Design and Analysis

  • Complexity Analysis
  • Search Strategies
PDF source code: Graph Search source code: Tree Traversal
  • Combinatorial Search
  • Reduce and Conquer
  • Decrease and Conquer
Binary Search, Binary Search Tree, and Segment Tree source code
  • Sorting and Selection
PDF source code: sorting algorithms source code: Python comparison and sort functions
  • Dynamic Programming
  • Greedy Algorithms

Classical Algorithms

  • Advanced Search on Linear Data Structures
  • Advanced Graph Algorithms
  • Advanced Data Structures
  • String Pattern Matches
  • Math and Geometry Algorithms

Problem Patterns

  • Dynamic Programming Questions (15%)
  • Array Questions (15%)
  • Linked List, Stack, Queue, and Heap Questions (12%)
  • String Questions (15%)
  • Tree Questions (10%)
  • Graph Questions (15%)

Note: everything is still in progress, so use it with caution.

Referring Books and Materials

Skiena, Steven S. The algorithm design manual: Text. Vol. 1. Springer Science & Business Media, 1998.

T. H. Cormen, Introduction to algorithms, MIT press, 2009.

Manber, Udi. Introduction to algorithms: a creative approach. Addison-Wesley Longman Publishing Co., Inc., 1989.

Kleinberg, Jon, and Eva Tardos. Algorithm design. Pearson Education India, 2006.

Russell, Stuart J., and Peter Norvig. Artificial intelligence: a modern approach. Malaysia; Pearson Education Limited,, 2016. ( Best book ever in explaining searching problem-solving, differentiate tree-search and graph-search )

D. M. Beazley, Python essential reference, Addison-Wesley Professional,2009.

S. Halim and F. Halim, Competitive Programming 3, Lulu Independent Publish, 2013.

B. Slatkin, Effective Python: 59 Specific Ways to Write Better Python,Pearson Education, 2015.

H. hua jiang, “Leetcode blogs,” https://zxi.mytechroad.com/blog/category , 2018, [Online; accessed 19-July-2018].

B. Baka, “Python data structures and algorithms: Improve application performance with graphs, stacks, and queues,” 2017.

“Competitive Programming,” https://cp-algorithms.com/ , 2019, [Online; accessed 19-July-2018].

“cs princeton,” https://aofa.cs.princeton.edu/60trees/ , 2019, [Online; accessed 19-July-2018]

  • Graph Visualize with graphviz . Examples . Tutorial to use Python

Mocking Interviews

Practice is important. Schedule some mocking interviews with interviewing.io

If you have ideas to improve the book, about formatting, more contents, or correct the errors, do not hesitate to let me know.

  • Jupyter Notebook 100.0%

Python Practice for Beginners: 15 Hands-On Problems

Author's photo

  • online practice

Want to put your Python skills to the test? Challenge yourself with these 15 Python practice exercises taken directly from our Python courses!

There’s no denying that solving Python exercises is one of the best ways to practice and improve your Python skills . Hands-on engagement with the language is essential for effective learning. This is exactly what this article will help you with: we've curated a diverse set of Python practice exercises tailored specifically for beginners seeking to test their programming skills.

These Python practice exercises cover a spectrum of fundamental concepts, all of which are covered in our Python Data Structures in Practice and Built-in Algorithms in Python courses. Together, both courses add up to 39 hours of content. They contain over 180 exercises for you to hone your Python skills. In fact, the exercises in this article were taken directly from these courses!

In these Python practice exercises, we will use a variety of data structures, including lists, dictionaries, and sets. We’ll also practice basic programming features like functions, loops, and conditionals. Every exercise is followed by a solution and explanation. The proposed solution is not necessarily the only possible answer, so try to find your own alternative solutions. Let’s get right into it!

Python Practice Problem 1: Average Expenses for Each Semester

John has a list of his monthly expenses from last year:

He wants to know his average expenses for each semester. Using a for loop, calculate John’s average expenses for the first semester (January to June) and the second semester (July to December).

Explanation

We initialize two variables, first_semester_total and second_semester_total , to store the total expenses for each semester. Then, we iterate through the monthly_spending list using enumerate() , which provides both the index and the corresponding value in each iteration. If you have never heard of enumerate() before – or if you are unsure about how for loops in Python work – take a look at our article How to Write a for Loop in Python .

Within the loop, we check if the index is less than 6 (January to June); if so, we add the expense to first_semester_total . If the index is greater than 6, we add the expense to second_semester_total .

After iterating through all the months, we calculate the average expenses for each semester by dividing the total expenses by 6 (the number of months in each semester). Finally, we print out the average expenses for each semester.

Python Practice Problem 2: Who Spent More?

John has a friend, Sam, who also kept a list of his expenses from last year:

They want to find out how many months John spent more money than Sam. Use a for loop to compare their expenses for each month. Keep track of the number of months where John spent more money.

We initialize the variable months_john_spent_more with the value zero. Then we use a for loop with range(len()) to iterate over the indices of the john_monthly_spending list.

Within the loop, we compare John's expenses with Sam's expenses for the corresponding month using the index i . If John's expenses are greater than Sam's for a particular month, we increment the months_john_spent_more variable. Finally, we print out the total number of months where John spent more money than Sam.

Python Practice Problem 3: All of Our Friends

Paul and Tina each have a list of their respective friends:

Combine both lists into a single list that contains all of their friends. Don’t include duplicate entries in the resulting list.

There are a few different ways to solve this problem. One option is to use the + operator to concatenate Paul and Tina's friend lists ( paul_friends and tina_friends ). Afterwards, we convert the combined list to a set using set() , and then convert it back to a list using list() . Since sets cannot have duplicate entries, this process guarantees that the resulting list does not hold any duplicates. Finally, we print the resulting combined list of friends.

If you need a refresher on Python sets, check out our in-depth guide to working with sets in Python or find out the difference between Python sets, lists, and tuples .

Python Practice Problem 4: Find the Common Friends

Now, let’s try a different operation. We will start from the same lists of Paul’s and Tina’s friends:

In this exercise, we’ll use a for loop to get a list of their common friends.

For this problem, we use a for loop to iterate through each friend in Paul's list ( paul_friends ). Inside the loop, we check if the current friend is also present in Tina's list ( tina_friends ). If it is, it is added to the common_friends list. This approach guarantees that we test each one of Paul’s friends against each one of Tina’s friends. Finally, we print the resulting list of friends that are common to both Paul and Tina.

Python Practice Problem 5: Find the Basketball Players

You work at a sports club. The following sets contain the names of players registered to play different sports:

How can you obtain a set that includes the players that are only registered to play basketball (i.e. not registered for football or volleyball)?

This type of scenario is exactly where set operations shine. Don’t worry if you never heard about them: we have an article on Python set operations with examples to help get you up to speed.

First, we use the | (union) operator to combine the sets of football and volleyball players into a single set. In the same line, we use the - (difference) operator to subtract this combined set from the set of basketball players. The result is a set containing only the players registered for basketball and not for football or volleyball.

If you prefer, you can also reach the same answer using set methods instead of the operators:

It’s essentially the same operation, so use whichever you think is more readable.

Python Practice Problem 6: Count the Votes

Let’s try counting the number of occurrences in a list. The list below represent the results of a poll where students were asked for their favorite programming language:

Use a dictionary to tally up the votes in the poll.

In this exercise, we utilize a dictionary ( vote_tally ) to count the occurrences of each programming language in the poll results. We iterate through the poll_results list using a for loop; for each language, we check if it already is in the dictionary. If it is, we increment the count; otherwise, we add the language to the dictionary with a starting count of 1. This approach effectively tallies up the votes for each programming language.

If you want to learn more about other ways to work with dictionaries in Python, check out our article on 13 dictionary examples for beginners .

Python Practice Problem 7: Sum the Scores

Three friends are playing a game, where each player has three rounds to score. At the end, the player whose total score (i.e. the sum of each round) is the highest wins. Consider the scores below (formatted as a list of tuples):

Create a dictionary where each player is represented by the dictionary key and the corresponding total score is the dictionary value.

This solution is similar to the previous one. We use a dictionary ( total_scores ) to store the total scores for each player in the game. We iterate through the list of scores using a for loop, extracting the player's name and score from each tuple. For each player, we check if they already exist as a key in the dictionary. If they do, we add the current score to the existing total; otherwise, we create a new key in the dictionary with the initial score. At the end of the for loop, the total score of each player will be stored in the total_scores dictionary, which we at last print.

Python Practice Problem 8: Calculate the Statistics

Given any list of numbers in Python, such as …

 … write a function that returns a tuple containing the list’s maximum value, sum of values, and mean value.

We create a function called calculate_statistics to calculate the required statistics from a list of numbers. This function utilizes a combination of max() , sum() , and len() to obtain these statistics. The results are then returned as a tuple containing the maximum value, the sum of values, and the mean value.

The function is called with the provided list and the results are printed individually.

Python Practice Problem 9: Longest and Shortest Words

Given the list of words below ..

… find the longest and the shortest word in the list.

To find the longest and shortest word in the list, we initialize the variables longest_word and shortest_word as the first word in the list. Then we use a for loop to iterate through the word list. Within the loop, we compare the length of each word with the length of the current longest and shortest words. If a word is longer than the current longest word, it becomes the new longest word; on the other hand, if it's shorter than the current shortest word, it becomes the new shortest word. After iterating through the entire list, the variables longest_word and shortest_word will hold the corresponding words.

There’s a catch, though: what happens if two or more words are the shortest? In that case, since the logic used is to overwrite the shortest_word only if the current word is shorter – but not of equal length – then shortest_word is set to whichever shortest word appears first. The same logic applies to longest_word , too. If you want to set these variables to the shortest/longest word that appears last in the list, you only need to change the comparisons to <= (less or equal than) and >= (greater or equal than), respectively.

If you want to learn more about Python strings and what you can do with them, be sure to check out this overview on Python string methods .

Python Practice Problem 10: Filter a List by Frequency

Given a list of numbers …

… create a new list containing only the numbers that occur at least three times in the list.

Here, we use a for loop to iterate through the number_list . In the loop, we use the count() method to check if the current number occurs at least three times in the number_list . If the condition is met, the number is appended to the filtered_list .

After the loop, the filtered_list contains only numbers that appear three or more times in the original list.

Python Practice Problem 11: The Second-Best Score

You’re given a list of students’ scores in no particular order:

Find the second-highest score in the list.

This one is a breeze if we know about the sort() method for Python lists – we use it here to sort the list of exam results in ascending order. This way, the highest scores come last. Then we only need to access the second to last element in the list (using the index -2 ) to get the second-highest score.

Python Practice Problem 12: Check If a List Is Symmetrical

Given the lists of numbers below …

… create a function that returns whether a list is symmetrical. In this case, a symmetrical list is a list that remains the same after it is reversed – i.e. it’s the same backwards and forwards.

Reversing a list can be achieved by using the reverse() method. In this solution, this is done inside the is_symmetrical function.

To avoid modifying the original list, a copy is created using the copy() method before using reverse() . The reversed list is then compared with the original list to determine if it’s symmetrical.

The remaining code is responsible for passing each list to the is_symmetrical function and printing out the result.

Python Practice Problem 13: Sort By Number of Vowels

Given this list of strings …

… sort the list by the number of vowels in each word. Words with fewer vowels should come first.

Whenever we need to sort values in a custom order, the easiest approach is to create a helper function. In this approach, we pass the helper function to Python’s sorted() function using the key parameter. The sorting logic is defined in the helper function.

In the solution above, the custom function count_vowels uses a for loop to iterate through each character in the word, checking if it is a vowel in a case-insensitive manner. The loop increments the count variable for each vowel found and then returns it. We then simply pass the list of fruits to sorted() , along with the key=count_vowels argument.

Python Practice Problem 14: Sorting a Mixed List

Imagine you have a list with mixed data types: strings, integers, and floats:

Typically, you wouldn’t be able to sort this list, since Python cannot compare strings to numbers. However, writing a custom sorting function can help you sort this list.

Create a function that sorts the mixed list above using the following logic:

  • If the element is a string, the length of the string is used for sorting.
  • If the element is a number, the number itself is used.

As proposed in the exercise, a custom sorting function named custom_sort is defined to handle the sorting logic. The function checks whether each element is a string or a number using the isinstance() function. If the element is a string, it returns the length of the string for sorting; if it's a number (integer or float), it returns the number itself.

The sorted() function is then used to sort the mixed_list using the logic defined in the custom sorting function.

If you’re having a hard time wrapping your head around custom sort functions, check out this article that details how to write a custom sort function in Python .

Python Practice Problem 15: Filter and Reorder

Given another list of strings, such as the one below ..

.. create a function that does two things: filters out any words with three or fewer characters and sorts the resulting list alphabetically.

Here, we define filter_and_sort , a function that does both proposed tasks.

First, it uses a for loop to filter out words with three or fewer characters, creating a filtered_list . Then, it sorts the filtered list alphabetically using the sorted() function, producing the final sorted_list .

The function returns this sorted list, which we print out.

Want Even More Python Practice Problems?

We hope these exercises have given you a bit of a coding workout. If you’re after more Python practice content, head straight for our courses on Python Data Structures in Practice and Built-in Algorithms in Python , where you can work on exciting practice exercises similar to the ones in this article.

Additionally, you can check out our articles on Python loop practice exercises , Python list exercises , and Python dictionary exercises . Much like this article, they are all targeted towards beginners, so you should feel right at home!

You may also like

hands on algorithmic problem solving

How Do You Write a SELECT Statement in SQL?

hands on algorithmic problem solving

What Is a Foreign Key in SQL?

hands on algorithmic problem solving

Enumerate and Explain All the Basic Elements of an SQL Query

IMAGES

  1. DAA 1 7 Fundamentals of Algorithmic problem solving

    hands on algorithmic problem solving

  2. Algorithm and Flowchart

    hands on algorithmic problem solving

  3. Algorithm Problem Solving Flow Chart Hands Working Together As A Team

    hands on algorithmic problem solving

  4. 19MCA42-Algorithmic Problem Solving Steps

    hands on algorithmic problem solving

  5. Fundamentals of Algorithmic Problem Solving

    hands on algorithmic problem solving

  6. Algorithmic Problem Solving

    hands on algorithmic problem solving

VIDEO

  1. Optimization in Algorithmic Problem Solving: DP, Memoization, and Tabulation

  2. GE 3151 -PSPP- Algorithmic problem solving techniques

  3. 💡programmers think like a problem solver so is the algorithm and flowchart #coding #algorithm

  4. algorithmic problem solving in real world senorices

  5. Minimal Spanning Tree Algorithm

  6. 1.5 Algorithmic Problem Solving in Tamil

COMMENTS

  1. Hands-on Algorithmic Problem Solving

    A middle-to-high level algorithm book designed with coding interview at heart! - eodenyire/Hands-on-Algorithmic-Problem-Solving

  2. Hands-on Algorithmic Problem Solving

    This is a book designed to make up this role in the categorization; learning the algorithmic problem solving by analyzing and practicing interview problems -- a reciprocal relationship that makes 1+1=4: Algorithms, Interviews, Passion, and Confidence.

  3. PDF Principles of Algorithmic Problem Solving

    Algorithmic problem solving is the art of formulating efficient methods that solve problems of a mathematical nature. From the many numerical algo-rithms developed by the ancient Babylonians to the founding of graph theory by Euler, algorithmic problem solving has been a popular intellectual pursuit during the last few thousand years.

  4. Algorithmic Problem Solving: Preparing for a Coding Interview

    Mastering Algorithms for Problem Solving in Python. This course provides a thorough exploration of essential algorithmic techniques fundamental in programming. It covers deep understanding of big-O notation, which is a crucial concept for evaluating the efficiency and performance of algorithms, in C++, Java, and Python In this course, you'll ...

  5. Mastering Algorithms for Problem Solving in Python

    As a developer, mastering the concepts of algorithms and being proficient in implementing them is essential to improving problem-solving skills. This course aims to equip you with an in-depth understanding of algorithms and how they can be utilized for problem-solving in Python. Starting with the basics, you'll gain a foundational understanding ...

  6. Introduction to the Course

    It includes numerous examples and challenges to reinforce your understanding and provide hands-on experience in implementing and analyzing algorithms. What this course has to offer. ... Additionally, programmers and professionals seeking to enhance their algorithmic knowledge and problem-solving skills will find the course valuable. The content ...

  7. Mastering Algorithms: Practical Approach in Python

    Work on hands-on projects and case studies that simulate industry challenges, preparing you for practical algorithmic problem-solving. 7. Optimizing Code: Gain insights into optimizing code for better performance. Understand the importance of algorithmic efficiency in software development and learn best practices for writing scalable and ...

  8. Introduction to Linked List Mastery

    Welcome to the Linked List section of "Hands-On Problem-Solving in Python: Mastering the Blind 75 LeetCode Challenges." In this segment, we embark on a journey through the intricacies of linked lists — a fundamental data structure in computer science and a cornerstone of algorithmic problem-solving. Navigating the Linked List Landscape#

  9. Learn Essential Algorithmic Thinking Skills

    Build job-relevant skills in under 2 hours with hands-on tutorials. Courses (295) Learn from top instructors with graded assignments, videos, and discussion forums. Projects (1) ... Problem-solving: Algorithmic thinking revolves around solving complex problems. Developing strong problem-solving skills will aid you in breaking down problems into ...

  10. Open and Interactive Learning Resources for Algorithmic Problem Solving

    Abstract. Algorithmic problem solving is a way of approaching and solving problems by using the advances that have been made in the principles of correct-by-construction algorithm design. The approach has been taught at first-year undergraduate level since September 2003 and, since then, a substantial amount of learning materials have been ...

  11. Algorithmic Thinking: A Problem-Based Introduction

    A hands-on, problem-based introduction to building algorithms and data structures to solve problems with a computer. Algorithmic Thinking will teach you how to solve challenging programming problems and design your own algorithms. Daniel Zingaro, a master teacher, draws his examples from world-class programming competitions like USACO and IOI.

  12. Chapter 1: Array Hashing

    Welcome to the Array Hashing section of "Hands-On Problem-Solving in Python: Mastering the Blind 75 LeetCode Challenges." In this segment, we will explore a curated selection of LeetCode problems focused on array hashing, a powerful technique in algorithmic problem-solving. Navigating the Array Hashing Terrain#

  13. How to use algorithms to solve everyday problems

    My approach to making algorithms compelling was focusing on comparisons. I take algorithms and put them in a scene from everyday life, such as matching socks from a pile, putting books on a shelf, remembering things, driving from one point to another, or cutting an onion. These activities can be mapped to one or more fundamental algorithms ...

  14. How to Use Algorithms to Solve Problems?

    Let's take some examples of algorithms for computer science problems. Example 1. Swap two numbers with a third variable. Step 1: Start. Step 2: Take 2 numbers as input. Step 3: Declare another variable as "temp". Step 4: Store the first variable to "temp". Step 5: Store the second variable to the First variable.

  15. Book Review

    In September 2020, I published a review of Algorithmic Thinking: A Problem-Based Introduction by Daniel Zingaro. This is an update for the forthcoming second edition of the book. Solving Problems With Algorithms Computers are great at evaluating programmers' algorithmic problem-solving skills. Hence the proliferation of online judges used for screening job candidates, running coding contests

  16. Hands-on Algorithmic Problem Solving

    Preparation: introduce the global picture of algorithmic problem solving and coding interviews, learn abstract data structures and highly related and useful math such as recurrence relation, and hands-on Python practice by relating the abstract data structures to Python data structures. Coding is not just code after all.,

  17. Hands-On Guide: Real-World Greedy Algorithm Applications

    The third step involves creating an iterative process to solve all the subproblems. Through this approach, the algorithm progressively finds the optimal solution by solving a problem step-by-step, always choosing the option that offers immediate maximum value. The final step is the application of these algorithms to real-world problems. The ...

  18. Technical Interview Practice with JavaScript

    Learn key interview preparation skills and practice algorithmic problem-solving in JavaScript. ... Learn how to approach problem-solving for technical interviews. 3. ... The platform. Hands-on learning. AI-Assisted Learning Make progress faster with our AI Learning Assistant, a tool that automatically understands your current course ...

  19. Learn Data Structures and Algorithms (DSA)

    In mathematics and computer science, an algorithm is a finite sequence of rigorous instructions, typically used to solve a class of specific problems or to perform a computation. ... Practice: Gain proficiency through hands-on coding exercises, solving problems on online platforms, and participating in coding challenges. Algorithmic Thinking ...

  20. Hands-on Algorithmic Problem Solving

    This is a book designed to make up this role in the categorization; learning the algorithmic problem solving by analyzing and practicing interview problems -- a reciprocal relationship that makes 1+1=4: Algorithms, Interviews, Passion, and Confidence.

  21. Python Practice for Beginners: 15 Hands-On Problems

    Python Practice Problem 1: Average Expenses for Each Semester. John has a list of his monthly expenses from last year: He wants to know his average expenses for each semester. Using a for loop, calculate John's average expenses for the first semester (January to June) and the second semester (July to December).

  22. Data Science skills 101: How to solve any problem

    Problem solving strategy 3: Split the problem into parts. A problem halved is a problem solved. Source: Author. ... Netflix Prize, a competition challenging participants to improve the accuracy of the company's movie recommendation algorithm by at least 10%. The winning team would receive a $1 million prize [4].