Given numStack: 23, 26, 94 (top is 23)
What does Peek(numStack) return?

Answers

Answer 1

Using the knowledge in computational language in python it is possible to write a code that create a program that takes a string as an argument into its constructor.

Writting the code:

import java.util.*;

public class Expression

{

 Scanner in = new Scanner(System.in);

 Stack<Integer> stack = new Stack<Integer>();

 public boolean check()

 {

   System.out.println("Please enter your expression.");

   String newExp = in.next();

   String[] exp = new String[newExp];

   for (int i = 0; i < size; i++)

   {

     char ch = exp.charAt(i);

     if (ch == '(' || ch == '[' || ch == '{')

       stack.push(i);

     else if (ch == ')'|| ch == ']' || ch == '}')

     {

       //nothing to match with

       if(stack.isEmpty())

       {  

         return false;

       }

       else if(stack.pop() != ch)

       {

         return false;

       }

     }            

   }

   if (stack.isEmpty())

   {

     return true;

   }

   else

   {

     return false;

   }

 }

}

See more about JAVA at brainly.com/question/12975450

#SPJ1

Given NumStack: 23, 26, 94 (top Is 23)What Does Peek(numStack) Return?

Related Questions

For questions 1-3, consider the following code:



x = int(input("Enter a number: "))




if x != 7:

print("A")




if x >= 10:

print("B")




if x < 10:

print("C")




if x % 2 == 0:

print("D")


What is output if the user types in 10? Click all that apply.

Group of answer choices

D

A

C

B

Answers

Answer:

B

Explanation:

because 10 ranges between the x>=10

Write a note on scanning devices.

Answers

A scanner is a device that captures images from photographic prints, posters, magazine pages and similar sources for computer editing and display. Scanners work by converting the image on the document into digital information that can be stored on a computer through optical character recognition (OCR).

The programmer wants to change this code so that a third background image appears when the player presses the “B” button. What does the programmer need to do?

Answers

Answer:

i think its B but im not sure

Explanation:

In java language please.

Answers

A java program that creates a 2D integer array is given below:

The Program

//Class RURottenTomatoes

public class RURottenTomatoes

{

//main method

public static void main (String[] args)

{

 //Declaring & initializing variable to store index of command line argument

 int index = 0;

 

 //Obtaining number of rows & columns for 2D array from command line

 int r = Integer.parseInt(args[index++]);

 int c = Integer.parseInt(args[index++]);

 

 //Creating a 2D integer array of r rows & c columns

 int ratings[][] = new int[r][c];

 

 //Declaring iterator for loop

 int i, j;

 

 //Declaring variable to store sum of a movie ratings, highest sum of movie ratings

 int sum, highest;

 

 //Declaring variable to store index of sum of highest ratings movie

 int highest_index;

 

 //Filling value in 2D array from arguments of command line

 for ( i = 0; i < r; i++ )

 {

  for ( j = 0; j < c; j++ )

  {

   ratings[i][j] = Integer.parseInt(args[index++]);

  }

 }

 

 //Initializing highest sum of movie ratings & corresponding index

 highest = highest_index = -1;

 

 //Calculating index of the movie with highest sum of ratings

 for ( i = 0; i < c; i++ )

 {

  sum = 0;

  for ( j = 0; j < r; j++ )

  {

   sum = sum + ratings[j][i];

  }

 

  //Checking whether

  if(sum > highest)

  {

   highest = sum;

   highest_index = j;

  }

 }

 //Displaying index of the movie with highest sum of ratings

 System.out.println(highest_index);

}

}

OUTPUT

javac RURottenTomatoes.java

java RURottenTomatoes 3 4 1 2 3 4 5 6 7 8 9 10 11 12 3

Read more about java programming here:

https://brainly.com/question/18554491
#SPJ1

The programming team knows they need to create a program that will use a linear data structure to complete large amounts of data manipulation very
quickly. Which data structure is most appropriate? (1 point)
O array list
O graphs
O linked list
O maps

Answers

The programming team knows they need to create a program that will use a linear data structure to complete large amounts of data manipulation very quickly. Given the above scenario, the data structure is most appropriate is: "Linked Lists" (Option C)

What are linked lists?

It is to be noted that a linked list is a linear collection of data pieces whose order is determined by their physical placement in memory. Instead, each piece refers to the one before it.

It is a data structure made up of a collection of nodes that represent a sequence.

Linked lists are linear data structures that store information in separate objects known as nodes. These nodes include data as well as a reference to the next node in the list. Because of their ease of insertion and deletion, linked lists are often utilized.

Learn more about data structures:
https://brainly.com/question/24268720
#SPJ1

||||
Attempts Remaining: 1
Entering a Formula
Insert a formula in cell G4 that finds the value of subtracting
F4 from E4

Answers

Answer:

Explanation:

Formula:

= E4 - F4

where does an argument in a function go?

Answers

Answer:

Arguments are specified afterwards the operate name,inside the parentheses . you may add as many arguments as you want,just divide them with a comma .

Explanation:

Errors can be syntax errors or logic errors (the code works, but not as intended). In the Guess My Number game, there is a lower limit and an upper limit for the range of possible numbers to guess. If the lower limit were exclusive and the upper limit inclusive, which expression would properly generate values for the secret number?

(int)(Math.random() * (upper − lower + 1) ) + lower
(int)(Math.random() * (upper − lower) ) + lower + 1
(int)(Math.random() * (upper − lower + 1) ) + lower - 1

Answers

Errors can be syntax errors or logic errors (the code works, but not as intended) is option A: (int)(Math.random() * (upper − lower) ) + lower

What is  the syntax errors about?

The phrase that would correctly provide results for the secret number if the lower limit were inclusive and the upper limit exclusive is Option A

Note that we cannot increase the lower limit by one because it is INCLUSIVE. Additionally, the Math.random() function returns a result between [0,1[ that satisfies our requirements (meaning the 0 is included, but not the 1).

Therefore, We'll be flawless if the (int) caster returns only the integer component after rounding down the result.

Learn more about syntax errors from

https://brainly.com/question/13658401
#SPJ1

Why does internet privacy matter?

Answers

Answer:

Internet privacy is important because of the abundant amount of scammers, hackers, and others who want to exploit your information. It is also important to protect your personal information and browsing history, since these can be manipulated in many different ways.

Explanation:

The destination operand of the or instruction cannot be a memory operand.
a. True
b. False

Answers

The given statement is false. By performing a bitwise OR operation, the OR instruction supports logical expression.

What is OR instruction?By performing a bitwise OR operation, the OR instruction supports logical expression. If the matched bits from either or both operands are 1, the bitwise OR operator returns 1. If both of the bits are zero, it returns 0. One or more bits may be set using the OR operator. A bitwise instruction is an OR instruction. This implies that the digits of two integers with the same amount of bits (for example, two 32-bit numbers) are handled bit by bit (and not the complete number). If both "input" bits are 0, the OR instruction produces a result of 0, and a result of 1, if at least one input bit is a 1.A memory operand cannot be the destination operand of the OR instruction. The destination operand is always changed by the TEST instruction. The Zero flag is always set when an operand is XORed with 1. The two's complement of an integer can be created by applying the XOR instruction to it.The given statement is false. By performing a bitwise OR operation, the OR instruction supports logical expression.

To learn more about OR instruction refer to:

https://brainly.com/question/28108225

#SPJ13

Can someone help me with this worksheet?

Answers

Answer:

Here are the answers

Explanation:

Task:
1. Create a user named Administrator with
unlimited amount of space

2. Change the password of Administrator

3. Grant update privileges on the
Student_name, GPA columns to
Administraor user from Student table

4. Remove Privilege Update from
Administrator

5. Create a profile named MGProfile with 2
sessions per user and the life time of
password is 160 and 3 failed attempts to
log in to the user account before the
account is locked.

Answers

Most frequent reasons for Windows operating system loading errors: broken or faulty BIOS. The size and settings of a computer hard disk are not supported by BIOS. damaged or faulty hard disk.

How to Fix Operating System Loading ErrorAny Windows laptop or computer may experience the problem of Windows Error Loading Operating System at any time. This occurs when the computer tries to boot but displays an error message such as "Error loading operating system."The good news is that you don't need to freak out when your computer won't turn on. You can try a number of tested techniques to recover your data and restore your device.Most frequent reasons for Windows operating system loading errors:Damaged or faulty BIOSThe size or settings of a computer hard drive are not supported by BIOS.damaged or faulty hard diskthe incorrect disk was selected as the bootable hard drive to load the operatingoperating system that is incompatible.

To Learn more about loading errors refer to :

https://brainly.com/question/11472659

#SPJ1

A ______ is where one network ends and another begins.

Answers

Answer:

A demarcation point is where one network ends and another begins.

A demarcation point is where one network ends and another begins.

What is a demarcation point?

Two or more computers are connected together to share resources (such as printers and CDs), exchange files, and enable electronic communications to make up a network.

Where one network stops and another starts is known as a demarcation point. Explanation: In addition to the demarcation point, other terms for it include demarc extension, point of demarcation, and simply demarc.

A demarcation point often called a boundary point or network boundary point marks the physical boundary between a customer's private network and the public network of a telecommunications provider. Typically, this is where the cable actually enters a structure.

Therefore, the term where one network ends and another begins is a demarcation point.

To learn more about the demarcation point, refer to the link:

https://brainly.com/question/14533761

#SPJ12

Which device is not considered a computer?

a smartphone
an analog controller

Answers

Answer:

An analog controller is not considered a computer because you just move around the controls. You don't stare at a screen like a smartphone, so it is not a computer.

Explanation:

COPPA regulates personal information that companies can use. Which users does this law protect?

Answers

COPPA is required by law to protect children under the age of 13 years, from having their personal information used by companies.

What is a PII?

PII is an abbreviation for personally identifiable information and it can be defined as any type of information that can be used by individuals or companies on its own or with other relevant data, so as to identify an individual.

In the United States of America, Children's Online Privacy Protection Act (COPPA) is required by law to protect all American children who are under the age of 13 years, from having their personally identifiable information (PII) being used by business organizations (companies).

Read more on COPPA here: https://brainly.com/question/15608567

#SPJ1

Complete Question:

COPPA regulates personal information that companies can use. Which users does this law protect? COPPA protects children under the age of ________ from having their personal information used by companies.

". When input is wrong, the output will also be wrong, it is term S a. GIGO c. Bug b. IPM d. Debug​

Answers

Answer:

a.GIGO

b.bug

c.ipm

d. debug

it's answer is GIGO

1. What's the minimum RAM requirements to install or upgrade to Windows 11?
1 GB for 32-bit or 2 GB for 64-bit
O4 GB
8 GB

Answers

Answer:

4 GB

Explanation:

You need 4 gigabytes (GB) or greater. Storage: 64 GB* or greater available storage is required to install Windows 11. Extra storage space might be required to download updates and enable specific features. According to Windows 11 system requirements, my 4 GB ram is enough to upgrade my pc from windows 10 to windows 11.

A computer chip is
an example of hardware or software?

Answers

Answer: A system on a chip consists of both the hardware, described in § Structure, and the software controlling the microcontroller, microprocessor or digital signal processor cores, peripherals and interfaces.

i think it’s hardware

write a java program using switch that allow the user to input length and width and check if it is square or rectangle.

Answers

import java.util.Scanner;

class check_rectorsq {

   public static void main(String[] args) {

       System.out.println("Enter length and width: ");

       Scanner idx = new Scanner(System.in);

       int x = idx.nextInt();

       int y = idx.nextInt();

       int f = (x==y) ? 1 : 0;

       switch(f) {

           case 1:

               System.out.println("This is a square!");

               break;

           case 0:

               System.out.println("This is a rectangle!");

               break;

           default:

               ;;

       }

   }

}

Define a Video Graphics Card.
is it an input, processing, storage or output device?​

Answers

Answer:

output

Explanation:

video card, also called a graphics card, integrated circuit that generates the video signal sent to a computer display. A video card connects to the motherboard of a computer system and generates output images to display.

When assembling a career portfolio, what should a student do before assessing their work?

A.
consider the types of jobs they will likely apply for

B.
delete or throw away projects that are not good enough to include

C.
assemble the documents and files in the order they were created

D.
design a cover for a physical portfolio or a landing page for an electronic portfolio

Please don't guess.

Answers

Answer:

A.

Consider the types of jobs they will apply for.

Explanation:

It's critical to consider the types of jobs the student will apply for before assessing their work to know which information will be the most predominant and favorable to your employer.

Real estate management software

Answers

Answer:

nTireFM

Explanation:

is a comprehensive system for real estate vendors with unique and reliable needs. Real Estate Management Software simplifies your life as a real estate investor monitors the financial performance of each rental property

You have entered a URL into a browser and have received a 404 error. Which type of error did you receive?

Answers

Answer:

in redirect pages

Explanation:

the e page can not be down

Answer:

a 404 error is "File not found." This can happen when a file is deleted or there is an error in a hyperlink. It can also happen if a file is copied and the original deleted.

Explanation:

you're doing desktop support and the company policy is that you can only help with company equipment. a user walks in:

Answers

The responsibility of the desktop support technician is to support and maintain the desktops, peripherals, and computer systems of the organization. To achieve optimal workstation performance, this entails installing, identifying, repairing, maintaining, and upgrading all organizational hardware and tools.

How does desktop support work?

IT support professionals known as desktop support engineers help customers with hardware and software difficulties. Their duties include providing on-site or remote technical support for computer hardware setup, software installation and upgrade, and basic IT problem-solving. While a help desk can resolve a variety of IT problems, desktop support is limited to resolving problems with desktop or laptop computers. It can help you install apps or fix a malfunctioning computer, but it can't assist with printers or networks. The help desk service often includes desktop support. Yes, for many people, a job in desktop assistance is a good fit. This position is appropriate for entry-level workers who want to

To learn more about 'desktop' refer to

https://brainly.com/question/14719198

#SPJ13

is there anyone here who can teach me HTML​

Answers

Answer:

Codecademy has numerous free programs to provide you with the technical skills you need. ...

Learn-HTML.org is a reliable source for everything you need to know about HTML. ...

General Assembly Dash is a popular site to begin to learn the basics of HTML.

The control lines in the bus connect the control unit to the CPU.

True
Or False

Answers

Answer:

true

Explanation:

The control bus contains a control line for writing instructions and a control line for reading instructions. When the CPU writes data to the main memory, it transmits a signal to the write command line. The CPU also sends a signal to the read command line when it needs to read.

Which of the following is the correct binary representation of the number 2?

Answers

Answer:

10 i think

Explanation:

Facial recognition software is useful for identifying a suspect in a crime because human features are ________.

all the same

unique to an individual

hard for a human to identify

difficult for computers to examine

Answers

Answer:

Its (B) unique to an individual

Explanation:

Got it right on my quiz.

A student wants to create an Android Application to help a motorist to approximate the cost of a journey

by road. The app should enable the user to enter the length of the journey in Kilometres, the amount fuel

that the vehicle uses per kilometre and the cost of fuel per litre. The app should then calculate the total

amount that will be spent on fuel for the journey.

Sketch the interface for the activity that can be used for this task. (5 marks)

b) Declare and initialize all the widgets (views) that you can use for this task. Assume your own ids.

(5 marks)

c) Write the program to calculate the cost of the journey.

Answers

Answer:

Explanation: How to calculate fuel economy and usage

Manufacturers give a fuel economy figure for new cars in litres per 100km for urban, extra urban (i.e. higher speeds) and combined (a mixture of the two). This number is determined via a standardised test which, unfortunately, bears very little resemblance to the type of driving the vast majority of people do. If a vehicle you are looking at purchasing has an indicated fuel economy of 8l/100km, everyday driving is probably more likely to be around 10l/100km (this is my experience, after driving and reviewing over 400 cars since 2007).

However, the manufacturer-supplied figures are good for comparing between models, just not calculating what your expected fuel costs will be.

1. What operating system are you using on your computer?

Answers

Answer:

Windows

Explanation:

Flexible and convenient

Other Questions
Write a mathematical expression for the following statementFour times x is more than 13 Can someone give me the answer to this pls? Whats the correct answer answer asap for brainlist Scientists have discovered many methods to manipulate DNA and create phenotypes that do not naturally exist in nature. Which technique would NOT be used by a genetic scientist to produce new genetic variations in a lab?A. Transforming bacteria with engineered plasmids.B. Using lasers to cut and paste DNA.C. Inducing mutations with chemicals or radiation.D. Inserting genes using viruses as vectors. Calculate the perimeter for each of the following you have just bought your dream home along a coastline, but you notice that the beach in front of your new house is slowly disappearing. you decide to solve this by building a groin. winds blow predominantly from east to west. where do you place your groin? 2334567Happy Paws charges $19.00 plus $2.50 per hour to keep a dog during the day. Woof Watchers charges$10.00 plus 53.75 per hour. Complete the equation and solve it to find for how many hours the total costof the services is equal. Use the variable h to represent the number of hours.The equation isThe total cost of the services will be equal athours. Thenegative interval(3) of the functiony=-X+1 are I don't know what I'm doing wrong I just can't seem to get the answers right. Help please. Do you think it is possible to capture energy from photosynthesis for human use? haley requires all applicants take a paper-and-pencil test with logic and math problems on it. haley is giving her applicants a(n) test. skills cognitive ability honesty personality and interest Summarize Oxana's " Villanelle" character and describe who she is from the book "Killing Eve Codename Villanelle". 7 The distance-time graph for a motorcyclist riding off from rest is shown in Figure 1.2.18.a Describe the motion.b Calculate how far the motorbike moves in 30 seconds.c Calculate the speed. At a restaurant, Hamburgers cost $2.50 each and French Fries cost $1.20 each. If I went to this restaurant, and bought $8.60 worth of food,write an equation which models how many hamburgers and french fries I purchased.Let H represent HamburgersLet F represent French Fries. HELPPPP PLEASEPlace these steps in order todescribe the changes thatoccur in the organization of thechromosome as the cell progressesinto mitosis.a. The chromosome coils moreand more tightly, formingsupercoiled DNA.b. Condensed, replicatedchromosomes attach at apinched region called thecentromere.c. DNA is wrapped around histonesat regular intervals, formingchromatin.d. Interactions between parts ofhistones compact the DNA. what is 14+7.2n=11+7.5n (whole number) the digestive tract is approximately 30 feet long. Food enter the stomach after passing through the 10-inch esophagus. How many more inches will food need to travel prior to exiting the body? When Frank Cobb went to see President Wilson, how did the President seem to him? PLEASE HELP! WILL GIVE BRAINLIEST! (APES)The rate of species extinction on Earth is currently very high-perhaps as high as it has been since the time of the dinosaur extinction. Which of the followingdisruptions is not a major cause of this high extinction rate?- Deforestation caused by logging and the overharvesting of timber- Poaching and illegal trafficking in wildlife- Climate change caused by the burning of fossil fuels- Designating areas of wilderness as public lands the product of a number and -3 increased by 16 is 31