Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Given an array n integers, find and print all the unique triplets (a, b, c) in the array which give the sum K. (a+b+c=K).

The first line of the input will be space separated integers, denoting the elements of the array. The second line of the input will be an integer denoting the required sum KOutput


The output should be multiple lines, each line containing a unique triplet. The elements of the triple must be sorted in increasing order and all the triplets printed must be sorted in increasing order. Print "No Matching Triplets Found" if there are no triplets with the given sum.

input: 0 12 17 8 9 21

22

ouput:(0, 8, 21)

(0, 12, 17)

(8, 9, 12) should be like this


Given a matrix of order M*N and a value K, write a program to rotate each ring of the matrix clockwise by K elements. If in any ring has less than or equal to K elements, then don’t rotate that ring.

For example, if the given M and N are 4 and 4 respectively. If the matrix elements are

1 2 3 4

5 6 7 8

9 10 11 12

13 14 15 16

If the given K is 3. Rotate each ring of the matrix by 3 elements.

In the above matrix, the elements (1, 2, 3, 4, 8, 12, 16, 15, 14, 13, 9, 5) is a ring, similarly, the elements (6, 7, 11, 10) will make a ring.

Therefore, by rotating each ring in clockwise direction by 3 elements will give (13, 9, 5, 1, 2, 3, 4, 8, 12, 16, 15, 14) and (10, 6, 7, 11). So the output should be

13 9 5 1

14 7 11 2

15 6 10 3

16 12 8 4


Book Search

In this assignment, let's build a Book Search page by applying the concepts we learned till now.

Refer to the below image.


https://assets.ccbp.in/frontend/content/dynamic-webapps/book_search_output.gif


Instructions:

  • Add HTML input element with id searchInput inside an HTML container element
  • Add HTML select element with id selectDisplayCount inside an HTML container element
  • Add HTML container element with id searchResults


By following the above instructions, achieve the given functionality.

  • When a value is entered in the HTML input element with id searchInput and press on Enter key
  • Get title, imageLink, author (HTTP response with key search_results) by making HTTP request using fetch with URL https://apis.ccbp.in/book-store?title=kalam&maxResults=30
  • Set imageLink in the HTML img element and set author in the HTML paragraph element

how can we load data from excel file into table through sql loader tool


Write a program that calculates the average of up to 10 English distances input by the user.

Create an array of objects of the Distance class with the data members as feets and inches to

calculate the average create a member function called avgDistance(). (Hint: 12 inches = 1 Feet)


Create a class called Employee that contains the Name and Employee number (type long).

Include a member function called getData() to get data from the user for insertion into the object,

another function called putData() to display the data. The name should have no embedded blanks.

Write a main() program to exercise this class. It should create array of type Employee and then

invite the user to input data for up to 10 employees. Finally, it should print out the data for all the

employees. (Use setw, setiosflags to format the output).



Ali has decided to go Online with his fast food store. You have been hired by him to make a system for its sale of fast food items.

To create this program you have to create a C++ Program. The information that you are dealing with is name of Food item, category of Food (Desi, italian) price of Food item and stock to know how much the Food item is present in the stock.

First you need to create a menu which has the following options:

1.    Add a new Food item.

2.    Buy a Fruit item and display it.

a. Upon buying the fruit item should get decreased by the quantity bought.

b. If the quantity bought is 2, stock should be decreased by 2.

3.    Display fruits that have stocks lower than 10.

4.    Display Least expensive fruit Item from the list.



How many times each user has engaged with the videos of "News for you" channel (id = 366).


Note:

  • Consider engagement as LIKE or DISLIKE for a video uploaded by News for you channel.
  • Ignore the users who did not engage with the channel at least once.
  • Sort the output in the descending order of no_of_reactions, and then in the ascending order of user_id.

In subquries method


The first line of the input will contain a string A.

The second line of the input will contain a string B.Output


The output should contain overlapping word if present else print "No overlapping".Explanation


For example, if the given two strings, A and B, are "ramisgood" "goodforall"

The output should be "good" as good overlaps as a suffix of the first string and prefix of next.

for input

correct

wrong


No overlapping

The first line contains a single integer N.

Next N lines contain N space-separated integers Aij (i - index of the row, j - index of the column).

Next lines contain various operations on the array. Each operation on each line (Beginning either with R, U or Q).

-1 will represent the end of input.

sample input

2

5 6

7 8

R 90

Q 0 1

R 270

Q 1 1

R 180

U 0 0 4

Q 0 0

-1

Same output

5
8
8






LATEST TUTORIALS
APPROVED BY CLIENTS