Data Structures

Chapter 1 I Arrays and Strings

HashTables.

ArrayList & Resizable Arrays

StringBuilder.

Chapter 2 I Linked Lists

Creating a Linked List

Deleting a Node from a Singly Linked List

The “Runner” Technique

Recursive Problems

Chapter 3 | Stacks and Queues

Implementing a Stack

Implementing a Queue

Chapter 4 | Trees and Graphs

Types of Trees

Binary Tree Traversal

Binary Heaps (Min-Heaps and Mox-Heaps)

Tries (Prefix Trees)

Graphs

Graph Search

Algorithms

Chapter 5 | Bit Manipulation

Bit Manipulation By Hand

Bit Facts and Tricks

Two’s Complement and Negative Numbers

Arithmetic vs. Logical Right Shift

Common Bit Tasks: Getting and…


The most popular definition of clean code is code that is easy to understand and easy to change.

4 Steps for writing clean code:

  1. Clarity of Code (Unit Tests)
  2. 4 Principles of Simple Design
  3. Refactoring
  4. TDD
Thug Life

Unit Testing Organization/Attitude

  • More important than Code.
  • Lead to Better Design (due to Continuous Refactoring)
  • Best written before Code (TDD ).
  • TDD improves Design and Code Quality
  • Separated from Production Code
  • Find Defects Early
  • Continuous Integration

Unit Testing Principles

  • Easy to understand
  • A test should take no longer than 15 seconds to read
  • A test should fail only when there is a problem with…

  1. Horizontal vs Vertical scaling: Horizontal scaling means that you scale by adding more machines into your pool of resources whereas Vertical scaling means that you scale by adding more power (CPU, RAM) to an existing machine.
  2. DB Partitioning(Sharding): Partitioning is more a generic term for dividing data across tables or databases. Sharding is one specific type of partitioning, part of what is called horizontal partitioning
  3. Database Denormalization — Relational DB vs NoSQL: Denormalization is a time-space trade-off. Normalized data takes less space, but may require to join to construct the desired result set, hence more time. If it’s denormalized, data…

  • Attitude is far more important than talent. Talent will help you succeed. Attitude will help you face tough situations. — Anonymous
  • Perfection is the enemy of getting things done. — Anonymous
  • Ship your work, get feedback, improve. — Anonymous
  • If you wait until your work is perfect, you’ll wait forever.
  • Done is better than perfect.
  • “Noah did not start building the ark when it was raining” — Warren Buffet
  • The best way to look at the chessboard is from outside the chessboard- Kunal Shah
  • Never stop doing what made you successful. People get to a certain level of success and…

  1. Core Spring Framework Annotations:
  • @Required: It applies to the bean setter method. It indicates that the annotated bean must be populated at configuration time with the required property, else it throws an exception BeanInitilizationException.
  • @Autowired: Spring provides annotation-based auto-wiring by providing @Autowired annotation. It is used to auto-wire spring bean on setter methods, instance variable, and constructor. When we use @Autowired annotation, the spring container auto-wires the bean by matching the data-type.
  • @Configuration: It is a class-level annotation. The class annotated with @Configuration used by Spring Containers as a source of bean definitions.
  • @ComponentScan: It is used when we want…

1. SOLID principle:

S single responsibility principle- there should never be more than one 1reason for the class to change

O Open-closed principle- objects should be open for extension and closed for modification

L Liskov substitution principle- we should be able to substitute child class with the base class and

this should not alter the behaviour of a program

eg. instead of having a square extend rectangle have shape interface with the area as an abstract method

I Interface segregation principle. the interface should not have unnecessary abstract methods

D Dependency inversion principle- auto wiring in spring boot

2. The DRY Principle: Don’t Repeat Yourself

DRY stand for “Don’t Repeat…

Zeeshan Shaikh

Software Developer with 4+ years of experience in Java and web technologies. Health and Fitness enthusiast.

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