×
Home Discussions Write at Opengenus IQ
×
  • #7daysOfCode
  • C Interview questions
  • Linux 💽
  • 🔊 Data Structures
  • Graph Algorithms
  • Dynamic Programming 💑
  • Greedy Algo 📔
  • Algo Book 🧠
  • String Algo 🧬
  • Join our Internship 🎓
  • Home
Tanya Anand

Tanya Anand

Final Year Undergrad (2020) | CSE | NIT Hamirpur | Intern at OpenGenus

Hamirpur, Himachal Pradesh •
8 posts •
Dynamic Programming (DP)

Longest Bitonic Sequence

The problem we will solve is given a sequence an array of positive integers and have to find the length of longest bitonic subsequence. Using dynamic programming ideas, we will solve this on O(N^2) time complexity

Tanya Anand Tanya Anand
Algorithms

Number of arithmetic progression subsequences in a given set of numbers

The problem is that given an array of n positive integers. The task is to count the number of Arithmetic Progression subsequence in the array. This can be solved using dynamic programming in linear time complexity.

Tanya Anand Tanya Anand
Algorithms

Find the Longest Arithmetic Progression using Dynamic Programming

The problem we will solve is that given a set of integers in sorted order, find length of longest arithmetic progression in that set. This can be solved by brute force in O(N^3) while a dynamic programming approach with take O(N^2) time complexity.

Tanya Anand Tanya Anand
control statement

switch case control statement

A switch statement allows a variable to be tested for equality against a list of values. Each value is called a case, and the variable being switched on is checked for each case.if variable and case value are matched, then matched case will be executed.

Tanya Anand Tanya Anand
control statement

for loop control statement

A for loop allows us to write a loop that is executed a specific number of times. The loop enables us to perform n number of steps together in one line. We have provided the flow diagram, syntax and example to demonstrate for loop.

Tanya Anand Tanya Anand
control statement

do while loop control statement

A do-while loop is similar to a while loop, except the fact that it is guaranteed to execute at least one time. The do-while loop checks its condition at the bottom of the loop after one time execution of do.

Tanya Anand Tanya Anand
control statement

While loop control statement

A while loop is a control flow statement that allows code to be executed repeatedly based on a given condition. We have provided a flow chart, syntax and programming example to demonstrate while loop

Tanya Anand Tanya Anand
control statement

if-else control statement

if else is a programming construct/ concept for controlling the flow of program execution. The basic idea is to execute different code depending upon the outcome of an expression.

Tanya Anand Tanya Anand
×

Visit our discussion forum to ask any question and join our community

View Forum
OpenGenus IQ © 2021 All rights reserved â„¢ [email: team@opengenus.org]
Top Posts LinkedIn Twitter