having
Q: OKB Program Code 15KB
A: The Answer is
Q: DES S-box function python implementation
A: Below is the Python implementation of DES S-box function- At first, we'll initiate and fill the S-bo...
Q: Write a program that creates array of 10 integers. Ask the user to enter the data in the array. Each...
A: //note: since programming language is not mentioned we are providing answer in cpp #include <iost...
Q: What are BTL Strategies of Amazon and Flipkart explain briefly?
A: BTL Strategies of Amazon : 1. Client's Review. Amazon client survey administration has been one of ...
Q: 3. Using Pool() do the following: 3.1. The pool must have 2 processes, each process will pass two pa...
A: the answer is given below:-
Q: What is the difference between using +/- versus = when setting file permissions? Is there any benefi...
A:
Q: Two coins are loaded so that each comes up heads 80% of the time when tossed. If the coins are both ...
A: Introduction: Probability- Probability means possibility. It deals with the occurrence of a random e...
Q: Consider 1, 2, 3, 4, 1, 2, 5, 1, 2 and apply FIFO page replacement algorithm with frames-3. What is ...
A: By considering 1, 2, 3, 4, 1, 2, 5, 1, 2 and applying FIFO page replacement algorithm with frames-3....
Q: 1. Subtract [4-4-2] - [4 –3 5]. O A. [0 –7 3] O B. [0 –1 7] O C. [0 -1-7] O D. [0 -1 3] V Mark for r...
A: The problem is based on the basics of arithmetic operations.
Q: Use a Karnaugh map to minimize, F = AB'C'D' + A'B'C'D' + ABCD' +A'BCD+ ABD + B'CD' + A'BC'D.
A: The Answer is
Q: Implement the given Boolean function with multiplexer. F (A, B, C, D) =£ (m (1,3,5,7,8,10,12,13,14),...
A: The Answer is
Q: Convert the 32-bit two's complement number 00000000 0000 0000 1100 0000 0000 11112 to a decimal numb...
A: The Answer is
Q: Determine if project management software may help you keep a tighter rein on project costs.
A: So basically project planning is all about accuracy.Your project plan deserves your time and attenti...
Q: A private bank, for example, call it Bank Podo, has many branches spread across several cities in Am...
A: Answer 1. The issues included in Podo Bank are:- Replication and Allocation.
Q: finding a suitable material for outer cover of walkie talkie can you gave facts about it
A: The Components of a Walkie TalkieTypical workings will consist of a coil of wire, a magnet and a pap...
Q: #include #include int MAX_SIZE = 10; int n = 0; //A counter variable which will keep track of num...
A: Task : In the given C code, the output of the code is not correct. The task is to debug the code fo...
Q: QUESTION 4: In a plant, forklifts are used to deliver the materials between the departments. The fol...
A: Answer: I have given answered in the handwritten format in brief explanation.
Q: What is Internet? Mention some of the applications of Internet.
A: Internet : The internet sometimes called ‘the net’ is a vast network that interconnects the differen...
Q: Your last task is to place N rectangular blocsks with different sizes into a grid, by formulating it...
A: Please upvote please please please. I need it badly Please. This is rectangle packing / bin packin...
Q: You must add a canvas. Then ask the user to click ok if he enjoyed 2020 and cancel if he did ne Base...
A: Canvas is created using <canvas> tag. if-else statement is used in javascript to check if the ...
Q: Develop a multi-threaded vaccination Java program, where there is a shared global variable "vaccine_...
A: Java is a programming language and computing platform first released by Sun Microsystems in 1995 (no...
Q: Requirements: The latest production of the science-fiction blockbuster, "Bilbo of Hogwarts has trans...
A: Actually, program is an executable software that runs on a computer.
Q: This cupboard contains 4 inputs which is the switch, brightness, temperature, and the door. We assum...
A: Q: Code the given problem
Q: What are some cons of cloud Database?
A: Introduction: Servers, storage, databases, networking, and software are just some of the computing s...
Q: Define denial of service attack, or DoS attack. Describe a DDoS (distributed DoS) attack. Define zo...
A: Answer: "An attack in which steps are done to deny authorised users access to a system, its resource...
Q: When I am trying to display a text using the console.log() function in JavaScript then a newline cha...
A: Console .log() function is used to print the statements. The console. log() function outputs a mess...
Q: Convert the 32-bit two's complement number 00000000 0000 0000 1100 0000 0000 11112 to a decimal numb...
A: The Answer is
Q: Write a report on how the system can be improved to make faster decisions.
A: Please upvote please please please. I need it badly To improve the system to make better and fas...
Q: 1- Which of the following instructions can't be coded in 8086 assembly language? Give the reason. A-...
A: Below is the answer with explanation: As per our company guidelines we are supposed to answer only o...
Q: 2. write a program to print the following character pattern from any input string .ex:if the user in...
A: //Note :- You have not mention the language of program ,So i am doing your question in C++ language...
Q: find the charge stored in the capacitor at C capacitance & v potential difference in php programming...
A: Write a PHP program to find the charge stored in a capacitor with capacitance C and the potential di...
Q: What are the four factors on which efficiency of backtracking algorithm depends?
A: The Answer is in Below Steps
Q: A one-to-all communication between one source and all hosts on a network is classified as a communic...
A: 1. a one to all communication between one source and all hosts on a network is classified as a _____...
Q: draw a logical diagram for adding subjects 1-register 2-Deletion and addition to the people of the ...
A: Below is the logical diagram-
Q: Minimize the function using Karnaugh map method. F(A, B, C, D) = E(1, 2, 3, 8, 9, 10, 11, 14) + Ed(7...
A: The Answer is
Q: xG ample of Big O Nottion toge 3608cm id602928page1 Given the binary tree in Figure 2 below, list al...
A: To print the leaf nodes from the tree we have to follow certain steps that are: First, we have to c...
Q: 0100 0050 0150 0003 0080 0125 0152 0001 0020 0052 0000 0083 0000 binary tree in the picture (where n...
A: In this question, we have given a binary tree. We have given a node whole value is 90. For this node...
Q: Define bandwidth and latency. Note the affect of bandwidth and latency on system performance. Descr...
A: by bartleby guidelines i am able to do only 3 parts so please ask other questions separately.
Q: Question 2: In a demo class, write a public static method called removeLastOccurenceTen that receive...
A: Note : I provided both c++ and Java codes Please refer Using pointers, loop through the whole list ...
Q: ((((((((((((((((((((((Excel)))))))))))))))))))))))))))))))))) Create a Userform to add the followin...
A: Method:
Q: MCQ852: The fundamental notions of software engineering does not account for ? a. Software processes...
A: Given mcq is based on notions of SE.
Q: 29. Which of the following statements deletes the node to which cur points? b. cur->next - prev; d. ...
A: Which of the following statements deletes the node to which cur points? a prev->next = cur; b. cu...
Q: A cohesion is an extension of which concept?
A: Answer is in step 2
Q: Prefix and re-write the given XML document using the following namespaces. Stname Varchar 30 ...
A: As from the table we can observe there are two name spaces, having different data entities, in the f...
Q: et A denote the event "the mark for the Quiz". Let B denote the event "the mark for the Assignment"...
A: Lets see the solution.
Q: Artificial intelligence. In a study about the effect of different doses of a medicament, one patient...
A: Given: Days=5,8,10Dosage=2,3,2,4 Solving this using Linear Regression. The equation is: Y=a+bX Assum...
Q: calculate the mass of the substance after taking density and volume from the user in python language...
A: import math d= float(input("Density: ")) v= float(input("Volume: ")) result= ("Mass is : " +str(d*...
Q: List the properties of NoSQL databases?
A: Answer: Introduction: NoSQL is a schema-free alternative to SQL and RDBMSs for storing, processing, ...
Q: 4. Write a Matlab program to compute the value of 30*10 without using the * operator. Attach the out...
A: Solution: Given,
Q: Five keys 8, 25, 10, 15, 18 have been added to a hash table of size 4 that uses Separate Chaining us...
A: The Answer is in Below steps
do it with data structures - java
Write a recursive private method called countLeafAndOneEvenChild to be included in class BinaryTree as discussed in the lectures. The method counts and returns the number of leaf nodes and nodes having only one even child node in the binary tree.
This method is called from a public method countLeafAndOneEvenChild, given as follows:
public int countLeafAndOneEvenChildBT() {
return countLeafAndOneEvenChild(root);
}
Method heading:
private int countLeafAndOneEvenChild (Node<E> node)
Step by step
Solved in 2 steps
- using java code Problem: Suppose we want to write a program for the class BinaryTree that counts the number of times an object occurs in the tree. We need to use a method with the following header, public int count (O anObject) 1. Name your class objectCounter 2. Define main method, test the program 3. Write a method using one of the iterators of the binary tree. 4. Write another method using a private recursive method of the same name NB: Can you add main method to test the code please for 2. Define main method, test the programboɔ ypleð The following code shows how one might implement a binary tree node: public class TreeNode ( public int data; public TreeNode left; public TreeNode right; public TreeNode(int d, TreeNode 1, TreeNode r) { data = d; left - 1; right = r; Suppose we have the following binary tree (with root being the node at the top): 7 The following method is an instance method in the TreeNode class. public int c() { int leftc = 0; if (left != null) { leftc - left.c (); int rightc - 0; if (right != nul1) { rightC = right.c(); return leftc + rightC + 1; Suppose root.c() is called. What is returned? Show memory diagrams and/or stack frames to explain what the recursive calls are.Assume we have an IntBST class, which implements a binary search tree of integers. The field of the class is a Node variable called root that refers to the root element of the tree. 1) Write a recursive method for this class that computes and returns the sum of all integers less than the root element. Assume the tree is not empty and there is at least one element less than the root. 2) Write a recursive method that prints all of the leaves, and only the leaves, of a binary search tree. 3) Write a method, using recursion or a loop, that returns the smallest element in the tree.
- All the methods as well as the main method/tester statements must be written in one class. DO NOT write a different class for each method. NOTE: USE PYTHON AD SOLVE BOTH QUESTIONS IF YOU WANT A THUMBS UP. 1. Print elements of all the Nodes of a tree using In-order Traversal. 2. Print elements of all the Nodes of a tree using Post-order Traversal.10. Given the definition of a binary tree Node, write a method that returns the height ofa given node.Class TreeNode {Int value;TreeNode left;TreeNode right;}Static int height (TreeNode position) { }** Use only the definition of a TreeNode, don’t suppose we have other built-inmethods.5- Write an efficient java method that computes and returns the height from node t in a btree of any degree. . Please write proper comments in your java code. Your java code should not read or print anything. Assume btree node is defined as follow: private class node{ int count, data(); node parent, link[]:} // end class node private int height(node t){
- java program: University of Bahrain College of Information Technology Department of Computer Science Second Semester, 2020-2021 ITCS214 / ITCS215 / ITCS216 (Data Structures) Assignment 3 Implement generic class ArrayStack as discussed in the lectures having following methods: constructor, push, pop, peek, isEmpty, copy constructor, reallocate (private method). Also add following methods to this class: size: returns number of elements in the stack. contains: Search an element in the stack. If found returns true, else returns false. clear: Deletes all elements of the stack and make it empty stack. Implement generic class ArrayQueue as discussed in the lectures having following methods: constructor, copy constructor, offer, poll, peek, isEmpty, reallocate(private), iterator. Inner class Iter that implements interface Iterator having methods: constructor, hasNext, next. Also add following methods to the ArrayQueue class: size: returns number of elements in the queue. contains: Search…P1 Suppose we want to create a method for the class BinaryTree (file BinaryTree.java) thatcounts the number of times an object occurs in the tree.a. Write the methodpublic int count1(T anObject)which calls the private recursive methodprivate int count1(BinaryNode<T> rootNode, T anObject)to count the number of occurrences of anObjectb. Write the methodpublic int count2(T anObject)that counts the number of occurrences of anObject and that uses one of the iterators of thebinary tree.Compare the efficiencies of the previous the two methods count1 and count2 using big Onotation. Add your answer as a comment before the function definition P2 Suppose we want to create a method for the class BinaryTree that decides whether two treeshave the same structure. Two trees t1 and t2 have the same structure if:- If one has a left child, then both have left children and the left children are isomorphic,AND - if one has a right child, then both have right children and the right children…Java - class IntBTNode { private int data; private IntBTNode left; private IntBTNode right; } Write a new static method of the IntBTNode class to meet the following specification. public static boolean all10(IntBTNode root) // Precondition: root is the root reference of a binary tree (but // NOT NECESSARILY a search tree). // Postcondition: The return value is true if every node in the tree // contains 10. NOTE: If the tree is empty, the method returns true.
- Java - class IntBTNode { private int data; private IntBTNode left; private IntBTNode right; } Write a new static method of the IntBTNode class to meet the following specification. public static boolean has10(IntBTNode root) // Precondition: root is the root reference of a binary tree (but // NOT NECESSARILY a search tree). // Postcondition: The return value indicates whether 10 appears somewhere // in the tree. NOTE: If the tree is empty, the method returns false.Please fill in the code gaps if possible. This problem has been giving me trouble. Any help is appreciated. public class Node { private String element; // we assume elements are character strings private Node next; /* Creates a node with the given element and next node. */ public Node(String s, Node n) { //fill in body } /* Returns the element of this node. */ public String getElement() { //fill in body } /* Returns the next node of this node. */ public Node getNext() { //fill in body } // Modifier methods: /* Sets the element of this node. */ public void setElement(String newElem) { //fill in body } /* Sets the next node of this node. */ public void setNext(Node newNext) { //fill in body } }Assume we have an IntBST class, which implements a binary search tree of integers. The field of the class is a Node variable called root that refers to the root element of the tree. Write a recursive method that prints all of the leaves, and only the leaves, of a binary search tree.