Programming & Computer Science Answers

C++ 9913
Python 5288
Java | JSP | JSF 3611
C 1680
C# 1362
Computer Networks 989
Algorithms 652
Databases | SQL | Oracle | MS Access 641
HTML/JavaScript Web Application 588
Other 537
Visual Basic 358
Assembler 209
Software Engineering 202
AJAX | JavaScript | HTML | PHP 166
MatLAB 150
MatLAB | Mathematica | MathCAD | Maple 124
Action Script | Flash | Flex | ColdFusion 112
UNIX/Linux Programming 89
Web Development 73
Excel 36
ASP | ASP.NET 23
Delphi | Pascal 21
Perl 16
Prolog 9
Functional Programming 9
MathCAD 5
Wolfram Mathematica 4
WPF 4
Ruby | Ruby on Rails 3
NodeJS Web Application 2

Questions answered by Experts: 26 876

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

Write a c++ program to display the Fibonacci series of the first 50 integer numbers.

Write a c++ program to compute the results of five HND 1 students taking all the first semester courses displaying their number,course title and grades.

 Filter out movies which are released in more than 1 languages using movies dataset


You are given an array of N non-negative integers: A1A2, ..., AN. An alternating subsequence is a subsequence in which the indices of any two consecutive elements differ by exactly two in the original array. That is, if Ai1Ai2, ..., Aik is some subsequence, then for it to be an alternating subsequence, (i2 - i1 = 2), (i3 - i2 = 2), and so on should all hold true. Among all alternating subsequences, find the one which has maximum sum of elements, and output that sum.


Given an integer n (between 1 and 104) find two prime numbers (possibly same) p1,p2 such that p1+p2=n



In case there are multiple solutions, you can output any of them.




If there is no solution, then print -1 -1 instead.


Consider you are working as a developer in a software house “XYZ” and you have to develop a program that will detect the Real time objects by using the Camera. As a developer, you have to decide which programming paradigm would be feasible to design develop this system.


Identify the programming paradigm from the list given below and justify your answer with proper reasons.


Object Oriented Programming Paradigm

Procedural Programming Paradigm

Instructions:


1. You need to provide precise and to the point answer, avoid irrelevant details.


2. Material that is copied from the internet or another student will get zero marks.


3. You cannot participate in the discussion after the due date via email.


4. The GDB will open and close on specified date and time. Please note that NO grace day or extra time will be given for posting comments on GDB.


You are given an array of N non-negative integers: A1, A2, ..., AN. An alternating subsequence is a subsequence in which the indices of any two consecutive elements differ by exactly two in the original array. That is, if Ai1, Ai2, ..., Aik is some subsequence, then for it to be an alternating subsequence, (i2 - i1 = 2), (i3 - i2 = 2), and so on should all hold true. Among all alternating subsequences, find the one which has maximum sum of elements, and output that sum.


Input

The first line of the input contains an integer T denoting the number of test cases.


The first line of each test case contains an integer N denoting the number of elements in the array.


The second line contains N space-separated integers A1, A2, ..., AN denoting the array A.


Output

For each test case, output a single line containing the answer.


Note

A subsequence with only a single integer is also an alternating subsequence.

Constraints

1 ≤ T ≤ 10

1 ≤ N ≤ 105

0 ≤ Ai ≤ 105


Write a python program that splits a given string on a given split character. The first input is a String and the second input is the character that will be used to split the first String.



[You cannot use the built-in split function for this task]



=====================================================================



Sample Input 1:


This-is-CSE110


-



Sample Output 1:


This


is


CSE110



Explanation: The second input which is the character '-', is used to split or divide the first input String 'This-is-CSE110' into 'This', 'is' and 'CSE110' which are printed individually in separate lines.


An election is contested by 5 candidates. The candidates are numbered 1 to 5 and the voting is done by marking the candidate number on the ballot paper. Write a program to read the ballots and count the votes cast for each candidate. Create custom exception to find invalid age of voter

Design a class to represent a Employee details. Include the following members.

Data Members • Employee Name • Employee ID • Department Name •Basic Salary. Methods • To assign initial values • compute Net salary * print employee details. To Incorporate a constructor to provide initial values and array of objects.


LATEST TUTORIALS
APPROVED BY CLIENTS