With this course, you will:

  • Learn DSA using C++
  • Solve challenges in real-time
  • Earn a professional certificate
Fi Coin

Average Salary (US)

$114,997

Fi Box

Prerequisites

Fi Coin

Average Salary (US)

$114,997

Fi Box

Prerequisites

Course Hero Image
CourseBeta

DSA with C++

Optimize your code and ace your coding interviews with this course on Data Structures and Algorithms with C++.

  • Level: Intermediate

  • Duration: 1 month

  • Type: Interactive

  • Language: English

  • challenge

    Coding Challenges: 45+

  • message-question

    Quizzes: 60+

Don't just learn DSA

Solve challenges in real-time

Problem Description

Write a program to sort the vector elements in descending order using bubble sort.

  • Create a function named bubble_sort() that takes a vector as an argument.
  • Inside the function, sort the vector in descending order using bubble sort.
  • Print the sorted vector outside the function.

Example

1 15 6 8 2 5 9
15 9 8 6 5 2 1
main.cpp