Image for post
Image for post
Lambda Greek Symbol

There is no better way to explain the function (pun unintended) of complicated cloud services than walking through a step-by-step code example of an easy CS problem. We will be creating an AWS Lambda Function using Java as the service code. This function will be responsible for reversing strings that we pass to it as a payload. We will also be invoking that function using client Java code using the AWS SDK for Java.

Prerequisites

  1. This is partly an AWS tutorial. So make sure you have an AWS account.
  2. Because we will be making use of AWS on the client side to invoke our function, make sure you have AWS CLI installed on your system. I use CLI v2. Also, make sure you run the post-setup configuration steps, which will involve creating and authenticating with access keys. You can then run “aws configure” for a faster set up. …


Image for post
Image for post
AVL Tree of characters with balance factors

I’m going to get right to the point and assume you already know about Binary Search Trees (BST’s). You should be familiar with the BST property — that they can degenerate into Linked Lists given a special — but not uncommon — set of inputs during insertion. For example, inserting a set of numbers in sorted order into your BST will repeatedly add to the left child of all nodes in your tree — essentially creating a Linked List. This is bad for various reasons. The time complexity of standard tree operations is proportional to the height of the tree, and we’d really like the tree’s height to be log(n) in the worst case. …

Akshay Kumar

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