Java
Implement Stack In Java
Stack main class [crayon-5a2bba775f9e4480126587/] Stack Main Logic [crayon-5a2bba775f9ef774888228/]
Stack main class [crayon-5a2bba775f9e4480126587/] Stack Main Logic [crayon-5a2bba775f9ef774888228/]
Que main class [crayon-5a2bba775ffee600229331/] Queue main logic [crayon-5a2bba775fff5231736144/]
Filled [crayon-5a2bba7760205394966110/] Outlined [crayon-5a2bba776020c107147820/]
Unoptimized [crayon-5a2bba77603e2644784474/] Half Optimized [crayon-5a2bba77603ea223797271/] Optimized [crayon-5a2bba77603ed633301243/]
Pattern to be drawn [crayon-5a2bba77605b8292443038/] Output
First Way [crayon-5a2bba776078a339402525/] Second Way [crayon-5a2bba7760792827648033/]
Filled Triangle [crayon-5a2bba776095c225244872/] Output Hollow Triangle [crayon-5a2bba7760963178501446/] Output
using While [crayon-5a2bba7760b2c601941051/] Recursive [crayon-5a2bba7760b34594084368/]
What is a nasty number? Well it is a number whose four different factors can be arranged in such a way that sum of two is equal to difference of other two. Take an example of nasty number 36. It have factors 1,2,3,4,6,9,12,18. So, we have 2+1=6-3 . So, it Read more…