Implement the following sequence of operations one by one
1. Make a linked list for 26 (a to z) English alphabets where each node consists a single alphabet, an integer data for frequency count (initially 0) and next pointer. This list should be sorted in ascending order according to the ASCII value of the alphabets.
2. Now you have given a string consists of English alphabets. Your task is to update the frequency count values of above list for each occurrence of alphabets inside the given string.
For example, if the string is “babaaedd” then the updated list should be like this:
3. Finally traverse the whole list and print each Alphbets with their frequency one by one from a to z. Please follow the sample input-output format. Input string length is not more than 100.
Sample Input:
Mistcsedepartment
Sample Output:
a : 1
b : 0
c : 1
d : 1
e : 3
f : 0
g : 0
h : 0
i : 1
j : 0
k : 0
l : 0
m : 2
n : 1
o : 0
p : 1
q : 0
r : 1
s : 2
t : 3
u : 0
v : 0
w : 0
x : 0
y : 0
z : 0
Input: aabbhayy
Output: A2B2H1A1Y2
Note : please solve the above coding problem in python.
Given an integer
The first line of input is an integer
In the example, the given starting number is
10, and the number of rows in the pyramid is 5.
Write C++ program to print pyramid using *.
*
* * *
* * * * *
* * * * * * *
* * * * * * * * *
Write a menu driven single program, using switch case to perform the following operations in a single linked list by using different suitable user defined functions for each case.
[Ask the user "Do you want to continue (Press 1 or 0)"]
•Traverse the list
•Check if the list is empty [Call this to check underflow condition during the delete operation]
•Insert a node after a given data item
•Insert a node before a given data item
•Delete a node after a given data item
•Delete a node before a given data item
•Insert a node at the certain position (at beginning/end/any position)
•Delete a node at the certain position (at beginning/end/any position)
•Delete a node for the given key
•Search for an element in the linked list
•Sort the elements of the linked list
•Print the elements of the linked list in the reverse order
•Reverse the nodes of the linked list
•Print nth node from the last of a linked list
•Delete the duplicate elements in a linked list
(Tic-Tac-Toe) Create a class Tic-Tac-Toe that will enable you to write a program to play Tic-Tac-Toe. The
class contains a private 3-by-3 two-dimensional array. Use an enumeration to represent the value in
each cell of the array. The enumeration’s constants should be named X, O and EMPTY (for a position
that does not contain an X or an O). The constructor should initialize the board elements to EMPTY.
Allow two human players. Wherever the first player moves, place an X in the specified square, and place
an O wherever the second player moves. Each move must be to an empty square. After each move,
determine whether the game has been won and whether it’s a draw. Also, allow the player to specify
whether he or she wants to go first or second.
Write a javascript program that asks the user to enter his or her first name and then last name, and then
constructs, stores, and displays a third string consisting of the user’s last name followed by a comma, a
space, and first name. Use string objects and methods from the string header file. A sample run could
look like this:
Enter your first name: Paul
Enter your last name: Smith
Here’s the information in a single string: Smith, Paul