Video is locked.

Unlock this course with a free trial

Join today to access over 15,000 courses taught by industry experts.

Introduction to Data Structures & Algorithms in Java

How to calculate the time complexity

From the course: Introduction to Data Structures & Algorithms in Java

  • Course details

    Enhance your programming skill set by learning about some of the most commonly-used data structures and algorithms. In this course, instructor Raghavendra Dixit walks through how to use Java to write code to implement data structures and algorithms. After explaining why it's advantageous to study these topics, he goes over the analysis of algorithms and discusses arrays—a data structure found in most programming languages. He also explains how to implement linked lists in Java, and covers stacks, queues, recursion, binary search trees, heaps, and more.

    Note: This course was created by Packt Publishing. We are pleased to host this training in our library.

    Instructor

    • Click here to view Raghavendra Dixit’s instructor page

      Raghavendra Dixit

      • Raghavendra Dixit is an entrepreneur and technical architect with over 15 years of programming experience.

        A graduate of the Indian Institute of Technology, Raghavendra has worked in both product and service-based software companies. He has worked with languages such as Perl, Java, Objective-C, Scala, and JavaScript. He has also used various frameworks and platforms, including Spring, Play, Cocoa, and Android. In his free time, he likes to create technical content that's easy to follow, and helps people in the software industry enhance their skills and accelerate their careers.

    Skills covered in this course

  • Introduction

    - [Instructor] So the first step is to talk about the running time of an algorithm in terms of the size of the input data, but even this doesn't quite work because the same algorithm running on the same machine over the same set of input data will not really take exactly the same time in two different runs. Now one thing to note here is that an algorithm working over a small number of elements will take less time than when it works over a larger number of elements. That is, say, if an algorithm takes, say, one millisecond to work with five data items, it may take about two milliseconds, or four milliseconds, to work with 11 data items. So when we study time complexity of an algorithm, we essentially want to understand, or know, how the time of an algorithm varies with the size of the input data. That is, we would like to know what is called as the order of growth of an algorithm with the size of input data. Now what does it mean? Let's say there are two algorithms to do something…

  • Practice while you learn with exercise files

    Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.

    Download the exercise files for this course. Get started with a free trial today.

  • Download courses and learn on the go

    Watch courses on your mobile device without an internet connection. Download courses using your iOS or Android LinkedIn Learning app.

    Watch this course anytime, anywhere. Get started with a free trial today.

Contents