• 8 Patterns Review For Successful Coding Interview

    8 Patterns Review For Successful Coding Interview This is nothing but quick 5 min revision before going to interview. Visit https: https://codeandalgo.com for more such contents

  • Longest Substring Without Repeating Characters

    Leetcode#3 Longest Substring Without Repeating Characters Problem Statement Given a string s, find the length of the longest  substring  without repeating characters. Example 1: Input: s = “abcabcbb” Output: 3 Explanation: The answer is “abc”, with the length of 3. Example 2: Input: s = “bbbbb” Output: 1 Explanation: The answer is “b”, with the length of…

  • (TBD)Longest Consecutive Sequence

    Leetcode#128 Longest Consecutive Sequence Problem Statement Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence. You must write an algorithm that runs in O(n) time. Example 1: Input: nums = [100,4,200,1,3,2] Output: 4 Explanation: The longest consecutive elements sequence is [1, 2, 3, 4]. Therefore its length is 4. Example 2: Input:…

  • HashMap HashTable

    Interview Questions

  • Tree

    Binary Tree Interview Questions 1. Lowest Common Ancestor of a Binary Tree More Questions Please visit https: https://codeandalgo.com for more such contents

  • Lowest Common Ancestor of a Binary Tree

    LeetCode#236 Problem Statement Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between two nodes p and q as the lowest node in T that has both p and q as descendants (where we allow a node to be a descendant of itself).” Example 1:…

  • Kth Largest Element in an Array

    Kth Largest Element in an Array Logic Golang solution Kth Largest Element in an Array Output Largest k elements in array Output Please visit https: https://codeandalgo.com for more such contents