Backtracking
BacktrackingBacktracking is a general algorithmic technique that considers searching every possible combination in order to solve a computational problem. It is often used for solving constraint satisfaction problems, such as puzzles, combinatorial problems, and optimization problems. PermutationsThe problem of generating all permutations of a given list of distinct integers can be solved using backtracking. The idea is to build the permutations incrementally and explore each possibility recu...
Dynamic Programming
Dynamic ProgrammingDynamic programming is a method for solving complex problems by breaking them down into simpler subproblems, storing the results of those subproblems to avoid redundant work. It is particularly useful for optimization problems where the solution can be expressed as a combination of solutions to subproblems. Fibonacci SequenceThe Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones, usually starting with 0 and 1. The nth Fibonacci ...
Search
SearchSearch is a fundamental operation in computer science that involves finding a specific element or value within a data structure. There are various search algorithms, each with its own advantages and disadvantages depending on the context and the type of data structure being used. Some common search algorithms include: Linear Search: This algorithm checks each element in the data structure sequentially until it finds the target element or reaches the end of the structure. It has a time ...
Divide and Conquer Algorithm
Divide and Conquer AlgorithmHanota TowerThe Hanota Tower, also known as the Tower of Hanoi, is a mathematical puzzle that consists of three rods and a number of disks of different sizes. The objective is to move the entire stack of disks from one rod to another, following these rules: Only one disk can be moved at a time. Each move consists of taking the upper disk from one of the stacks and placing it on top of another stack or on an empty rod. No disk may be placed on top of a smaller disk...
Sort
SortStable Sort: Stable sort is a sorting algorithm that preserves the relative order of equal elements in the sorted output.Local Sort: Local sort is a sorting algorithm that sorts elements in a small region of the list. Bubble SortBubble sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order. The pass through the list is repeated until the list is sorted. Stable Sort: YesLocal Sort: Yes 12Time compl...
Regular Expression Conception
Regular Expression ConceptionA regular expression (regex) is a sequence of characters that defines a search pattern. It is commonly used for string matching and manipulation in various programming languages and tools. Regular expressions allow you to search for specific patterns in text, such as email addresses, phone numbers, or any other string format.Example:12# A regex pattern to match email addresses^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$ Regular Expression SyntaxBasic...
Shell Conception
Shell ConceptionA shell is a command-line interface that allows users to interact with the operating system. It provides a way to execute commands, run scripts, and manage files and processes. The shell acts as an intermediary between the user and the operating system, interpreting user input and executing the corresponding commands. 12345678cat /etc/shells# List of valid login shells:/bin/sh/bin/bash/bin/rbash/bin/dash/bin/zsh/bin/ksh example:1234# Check the current shellecho $SHELL # Change...
Python - Basic Syntax Cheat Sheet
Python Basic Syntax Cheat SheetA concise reference for Python beginners and developers coming from languages like JavaScript, Java, or C++. 1. Variables & Data Types12345678x = 10 # inty = 3.14 # floatname = "Alice" # stringis_valid = True # booleanitems = [1, 2, 3] # listdata = {"a": 1} # dictnums = (1, 2, 3) # tupleunique = {1, 2, 3} # set Type Checking12type(x) # <class 'int'>isins...
GraphQL Full-Stack Demo
GraphQL Full-Stack DemoThis demo project demonstrates a full-stack application using GraphQL with a React frontend and a Java backend. The backend is built using Spring Boot, which exposes a GraphQL API, while the frontend is developed using React to consume the API. BackendThe backend is built using Spring Boot, which provides a robust foundation for building web applications. It includes the necessary dependencies for GraphQL integration and data persistence. The first step is defining th...
GraphQL Fundamental Concepts
GraphQLGraphQL is a query language for APIs and a runtime for executing those queries by using a type system you define for your data. It was developed by Facebook in 2012 and released as an open-source project in 2015. GraphQL provides a more efficient, powerful, and flexible alternative to the traditional REST API. Fundamental Concepts Schema: The contract defining all data types, fields, and operations available in your API. Queries: Read operations used to fetch data. Mutations: Write ope...








