Skip to main content

Posts

Stack data structure

Welcome to  imalshablog.blogspot.com . In my first blog, I decided to write about the stack data structure. It is a very easy and basic data structure as well as it is a linear data structure. A stack is a list of elements in which an element may be inserted or deleted only at one end, called the top of the stack. The insertion or deletion is happened according to the  LIFO principle.  LIFO stands for Last-In-First-Out. Mainly, there are five basic operations have in the stack. Push -: This operation is used for inserting an element in the stack.        Before happening push operation, check whether the stack is full. if the stack is full, display the error message and exit. if the stack is not full, increment top to point next empty space and inserts the next element to stack top.  Push Algorithm       IF top = max - 1           print overflow      END IF ...

Drug and Alcohol Prevention

This article is based on the speech and the presentation about “Drug and Alcohol Prevention” was delivered by Mr. Pubudu Sumanasekara, who is executive director of Alcohol and Drug center (ADIC) of Sri Lanka. He made this valuable speech at the UCSC auditorium, under Enhancement program for the 1 st year student of UCSC undergraduate program on 7 th November 2018. As I understood, this lecture was mainly based on Drugs, alcohol and their influence on life. This speech has contained more facts, advice and social issues and science beyond the drugs through his experience. Drug menace is a serious problem among the youth of the world. Unfortunately, so many young generations of the present world have addicted to using drugs. It is comprised young generation of Sri Lanka. This leads to many social problems. The way reason is that they get addicted the drugs because of the parent’s default. Because they don’t attend to children, they refer to a fault. As a result, children campaign ...