Read a string, S, and print its integer value; if cannot be converted to an integer, print Bad String.
Note: You must use the String-to-Integer and exception handling constructs built into your submission language. If you attempt to use loops/conditional statements, you will get a 0 score.
Tag: javascript
Day 15: Linked List (30 Days of Code)
Complete the insert function in your editor so that it creates a new Node (pass data as the Node constructor argument) and inserts it at the tail of the linked list referenced by the head parameter. Once the new node is added, return the reference to the head node.
Note: The head argument is null for an empty list.
Day 13: Abstract Classes (30 Days of Code)
Task Given a Book class and a Solution class, write a MyBook class that does the following: Inherits from Book Has a parameterized constructor taking these 3 parameters: string title … Read more
Day 12: Inheritance (30 Days of Code)
Task You are given two classes, Person and Student, where Person is the base class and Student is the derived class. Completed code for Person and a declaration for Student are … Read more
Day 11: 2D Arrays(30 Days of Code)
Task: Calculate the hourglass sum for every hourglass in A, then print the maximum hourglass sum.
Sparse Arrays (Problem Solving: Data-Structures)
Task: There is a collection of input strings and a collection of query strings. For each query string, determine how … Read more
Left Rotation(Problem Solving: Data-Structures)
Task: A left rotation operation on an array of size n shifts each of the array’s elements 1 unit to the left. Given an integer,d, rotate … Read more
Arrays – DS
Task: An array is a type of data structure that stores elements of the same type in a contiguous block of memory. … Read more
Day 9: Binary Calculator (10 Days of Javascript)
Task: Implement a simple calculator that performs the following operations on binary numbers: addition, subtraction, multiplication, and division. Note that division … Read more
Day 8: Buttons Container (10 Days of Javascript)
Task: We want to create nine buttons enclosed in a div, laid out so they form a 3 X 3 grid. Each … Read more