Algorithms At Home Practice with Pseudo Code created by Aldi Andalan ([email protected])
Please note that I use this for practice from very raw scratch, I made this practice answer without search engine or AI help, or console on inspect element in any browser or code editor to check the answer. Assume that I do not have prior knowledge to Javascript at all eventhough I learn Javaswcript in FSSE RevoU Bootcamp. I only practice on it just for 40 minutes so I do not expect that I close to the most ideal psesudo code algorithm nevertheless, at least I try to practice to prepare for future algorithms lecture in milestone 4 or in futher future. I hope I still get feedback on guidance on how to start and improve my algorithms skills
Start
Create Function consists a and b
Define a and b as 3 and 8 with integer numbers data type
Define c as set of integer numbers in data type consists of numbers that less han 8 and more than 3
if c consists numbers less than 8 and more than 3
return or print c
End
start
define x as integer numbers consists of 1,2,2,4,5
create a function that give condition to x
the condition is :
if one number in x is counted more than one of the same number, return or print false,
else one number in x is counted not more than one, return or print true
end
comment only to identify number order in alphabetic letters:
h e l l o:
8 5 12 12 15
start
define h as 8
define e as 5
define l as 12
define o as 15
create function that sort integer numbers
change order of set number of 8, 5, 12, 12, 15 into 15, 12, 12, 5, 8
return 15, 12, 12, 5, 8 as initial aphabethic definition
end
start
define x as set of integer numbers consist of 1,2,3,4,5
create a function that will sum all of numbers in x
define y as sum all of 1,2,3,4,5 in x
or define y as sum all of numbers that are more than zero and less than 6
return y
end
start
define x as integer numbers consists of 1,2,4,2,5,1
define y as integer numbers consists of 2,5,7,3,5,8
set function as z that will contain each x and y
in the function of z set condition that if one of number inside inserted defintion (x or y) counted more than 1 of the same number return or print set of those numbers that contained more than 1 else print or return empty set
end