Strings

A string is a datatype that behaves like a data structure in the sense that it can be manipulated and has time and space complexity implications.

Strings are stored in memory as arrays of integers where each character in a given string is mapped to an integer via some character encoding standard like ASCII.

Strings are generally immutable which means they can not be changed after they are created. When you are doing any operation that changes the string, it is making a copy of it and manipulate it which at times can be costly.

Traverse 0(n) T 0(1)…


When I say a stack, Imagine a stack of books and when I say queue, Imagine a queue of people on an ATM machine waiting for their turns or a queue of people waiting to buy tickets on a movie theater. A stack is an array data structure whose elements follow LIFO (Last In First Out) rule while a queue is an array-like data structure whose elements follow FIFO(First In First Out) rule.

Stack of books (Photo by Kimberly Farmer on Unsplash)


Arrays

The array is a data structure consisting of a collection of elements, each identified by at least one index or key. In our layman language of lockers as our storage, an array can be regarded as a set of lockers that are back to back where each stored item can be accessed using the locker number (locker number is the index in this place). For an array of 3 integers where each integer takes 8 memory slots, 24 memory slots that are back to back will be needed to store these integers in an array format.

Photo by Moren Hsu on unsplash

Note that the…


As the saying goes, “All software engineers do is move data from one place to another, from one service to another”.

a data structure is a collection of data values, the relationships among them, and the functions or operations that can be applied to the data

@Wikipedia (Yeah, I know)

It is not just software engineers and data scientists who need to know about data structure; you likely use data structures every day without knowing. …


source: Psychology Today

In one way or another, people and society make us believe in unproven theories to sell us things we do not need or change the way we see ourselves and the world. While you may not agree with what I say, which I hope is true in most cases because your brain is yours to use; I have my opinions. I have theories just like everyone else, which I decided to believe in because of how my life turned out to be. We have different experiences and perceptions about life, and it is okay not to believe in what I…


Photo by: Jhack Diaz

Because we give the advice we need to hear the most and we consume awful things we deny to our beloved ones. We judge people by our theories, not by our deeds, maybe we would be more compassionate if we were to judge them by what we do. Maybe not all of us but I am just thinking we deserve a certificate of hypocrisy for saying one thing and do the opposite.

We smile when we are angry and we look away, trying to avoid eye contact in the quest of hiding our emotions. We pretend everything is okay when…


Photo credit: Menslink

You are now full of energy, passion, ambitions and you are the youngest you will ever be. Now that you have 18 years and ready to explore the world; I want to let you know that the world out there is different from the world you were living in. You have been happy for your little achievements and think that having books around you is the ultimate happiness but look; things will be different. I am not trying to scare you but I want you to be ready for the journey of betrayal and disappointments.

Yes, you are happy that…


You have all it takes. Why can not you explore?

I am not going to sugarcoat anything; Computer Science is hard but it is for everyone. Let that sink in, and I give a disclaimer before I proceed:

I do not know how CS in other schools looks like, maybe it is harder or not. While I will try to be on the majority side, I will be speaking mostly out of my experience, not everyone’s. So, consider that while you are reading. This post embodies my advice for ALU’s CS prospective students; you may want to read something else if you are not going to signup for CS, feel…


Do not follow your passion.

Passion hypothesis is overrated and if you want to know why I think so, you can read my previous post. A brief story about me:

Unsplash photo by Saskia Fairfull …Be So Good That They Can’t Ignore you

Back in O’level. I hated maths and whatever a person could associate with it. I wanted to study something else in A’level but my mom is a stereotypical African parent and She agreed that I will learn anything I want in any school I want as long as I can pay my school fees. African parents do not chill (I can not wait to have kids too -:)) and that…


What does really matter?

You are probably working hard, hoping tomorrow will be better.
Getting a zero in class makes you sad as if grade determines your future and it makes you re-assess your moves to make sure you are still on the right track.

You no longer have time to create relationships, they take time which you do not have in the bunch and which you can not afford waste.
You are anxious and scared about what might happen if you do not get it right. You keep pushing and make sure your dreams do not fade away. …

Innocent INGABIRE

I am an aspiring writer, an avid reader and a life-long learner

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store