Open in app

Sign In

Write

Sign In

Alkesh Ghorpade
Alkesh Ghorpade

113 Followers

Home

About

Published in Towards Dev

·4 days ago

LeetCode — Gray Code

Problem statement An n-bit gray code sequence is a sequence of 2^n integers where: Every integer is in the inclusive range [0, 2^n — 1], The first integer is 0, An integer appears no more than once in the sequence, The binary representation of every pair of adjacent integers differs by exactly…

Programming

5 min read

Programming

5 min read


Published in Nerd For Tech

·Jan 22

LeetCode — Binary Tree Right Side View

Problem statement Given the root of a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. Problem statement taken from: https://leetcode.com/problems/binary-tree-right-side-view Example 1: Input: root = [1, 2, 3, null, 5, null, 4] Output: [1, 3…

Programming

4 min read

LeetCode — Binary Tree Right Side View
LeetCode — Binary Tree Right Side View
Programming

4 min read


Published in Nerd For Tech

·Jan 21

LeetCode — Path Sum III

Problem statement Given the root of a binary tree and an integer targetSum, return the number of paths where the sum of the values along the path equals targetSum. The path does not need to start or end at the root or a leaf, but it must go downwards (i.e., …

Programming

6 min read

LeetCode — Path Sum III
LeetCode — Path Sum III
Programming

6 min read


Published in Nerd For Tech

·Jan 15

LeetCode — Remove Nodes From Linked List

Problem statement You are given the head of a linked list. Remove every node which has a node with a strictly greater value anywhere to the right side of it. Return the head of the modified linked list. Problem statement taken from: https://leetcode.com/problems/remove-nodes-from-linked-list Example 1: Input: head = [5, 2, 13, 3…

Programming

5 min read

Programming

5 min read


Published in Nerd For Tech

·Jan 14

LeetCode — Partition List

Problem statement Given the head of a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the original relative order of the nodes in each of the two partitions. Problem statement taken from: https://leetcode.com/problems/partition-list …

Leetcode

4 min read

LeetCode — Partition List
LeetCode — Partition List
Leetcode

4 min read


Published in Nerd For Tech

·Jan 8

LeetCode — Minimum Size Subarray Sum

Problem statement Given an array of positive integers nums and a positive integer target, return the minimal length of a subarray whose sum is greater than or equal to target. If there is no such subarray, return 0 instead. Problem statement taken from: https://leetcode.com/problems/minimum-size-subarray-sum Example 1: Input: target = 7, nums =…

Programming

6 min read

Programming

6 min read


Published in Nerd For Tech

·Jan 8

LeetCode — Binary Tree Level Order Traversal II

Problem statement Given the root of a binary tree, return the bottom-up level order traversal of its nodes' values. (i.e., from left to right, level by level from leaf to root). Problem statement taken from: https://leetcode.com/problems/binary-tree-level-order-traversal-ii/ Example 1: Input: root = [3, 9, 20, null, null, 15, 7] Output: [[15, 7], [9, 20]…

Programming

5 min read

LeetCode — Binary Tree Level Order Traversal II
LeetCode — Binary Tree Level Order Traversal II
Programming

5 min read


Published in Nerd For Tech

·Dec 25, 2022

LeetCode — Single Number III

Problem statement Given an integer array nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements that appear only once. You can return the answer in any order. You must write an algorithm that runs in linear runtime complexity and uses…

Programming

5 min read

Programming

5 min read


Published in Nerd For Tech

·Dec 24, 2022

LeetCode — Longest Consecutive Subsequence

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. Problem statement taken from: https://leetcode.com/problems/longest-consecutive-sequence Example 1: Input: nums = [100, 4, 200, 1, 3, 2] Output: 4 Explanation: The longest consecutive elements sequence is [1…

Leetcode

4 min read

Leetcode

4 min read


Published in Nerd For Tech

·Oct 9, 2022

LeetCode — Longest Common Subsequence

Problem statement Given two strings text1 and text2, return the length of their longest common subsequence. If there is no common subsequence, return 0. A subsequence of a string is a new string generated from the original string with some characters (can be none) deleted without changing the relative order of the…

Programming

8 min read

Programming

8 min read

Alkesh Ghorpade

Alkesh Ghorpade

113 Followers

Software Engineer. Working ShakaCode. My portfolio https://alkeshghorpade.me

Following
  • Asmita Karanje

    Asmita Karanje

  • Utkarsha Bakshi

    Utkarsha Bakshi

  • Tenny Tomas

    Tenny Tomas

  • Archana Patil

    Archana Patil

  • Alessandro Butler

    Alessandro Butler

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech