img

Software Development Blog

Generic in Swift. Real examples and use cases in real projects

Generic in Swift. Real examples and use cases in real projects

Generic code enables us to write flexible, reusable code. It helps us to avoid duplication and take our code consistent and more universal. I like statically typed languages like Swift because you need to understand where and how to use generics. In dynamically typed languages like PHP or Python, all functions work like generic code […]

READ MORE

Print the Elements of a Linked List. HackerRank Exercise

Print the Elements of a Linked List. HackerRank Exercise

This exercise is a part of my Linked List topic. If you’re new to linked lists, this is a great exercise for learning about them. Given a pointer to the head node of a linked list, print its elements in order, one element per line. If the head pointer is null (indicating the list is empty), don’t print […]

READ MORE

Climbing the Leaderboard – Medium HackerRank Exercise

Climbing the Leaderboard –  Medium HackerRank Exercise

Alice is playing an arcade game and wants to climb to the top of the leaderboard and wants to track her ranking. The game uses Dense Ranking, so its leaderboard works like this:  The player with the highest score is ranked number 1 on the leaderboard.  Players who have equal scores receive the same ranking number, and the […]

READ MORE