<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Karthik Murugesan</title>
    <link>https://karthikmuru.github.io/</link>
    <description>Recent content on Karthik Murugesan</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 01 Dec 2022 02:42:06 +0000</lastBuildDate><atom:link href="https://karthikmuru.github.io/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>LeetCode 121: Best time to buy and sell stock - Kadane&#39;s Algorithm</title>
      <link>https://karthikmuru.github.io/posts/kadanes-algorithm/</link>
      <pubDate>Thu, 01 Dec 2022 02:42:06 +0000</pubDate>
      
      <guid>https://karthikmuru.github.io/posts/kadanes-algorithm/</guid>
      <description>Problem : https://leetcode.com/problems/best-time-to-buy-and-sell-stock/
For this problem we need to find the indices i and j, maximising the equation prices[j] - prices[i], given j &amp;gt; i. Lets first approach the brute force solution of this problem.
1. Brute force: Complexity: O(n^2)
This is pretty straight forward. We iterate through the entire array and for each element we check the difference between the indices larger than the current index.
Code:
1int maxProfit(vector&amp;lt;int&amp;gt;&amp;amp; prices) { 2	3	int maxProfit = 0; 4	5	for(int i = 0; i &amp;lt; prices.</description>
    </item>
    
    <item>
      <title>About me</title>
      <link>https://karthikmuru.github.io/about/</link>
      <pubDate>Wed, 24 Aug 2016 17:51:42 +0000</pubDate>
      
      <guid>https://karthikmuru.github.io/about/</guid>
      <description>Resume: Resume
Github: karthikmuru
Linkedin: karthikmurugesan28</description>
    </item>
    
    <item>
      <title></title>
      <link>https://karthikmuru.github.io/resume/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://karthikmuru.github.io/resume/</guid>
      <description>Resume: Resume Email: murugesan.karthik@outlook.com LinkedIn: karthikmurugesan28
Projects: Projects
Education Degree: Master of Science Major: Computer Science
University: Arizona State University Graduation Year: 2023
Degree: Bachelor of Technology Major: Information Technology
University: Anna University Graduation Year: 2018
Skills Languages: Java, Python, C/C++, SQL (MySQL, Postgres), NoSQL, JavaScript, Ruby
Frameworks: Java Spring, Ruby on Rails, Node.js, Flask
Tools, Databases, and OS: AWS (Lambda, SQS, SNS, EC2, DynamoDB, S3), Pytorch, Tensorflow, Git, Linux/Unix, Docker, Kubernetes</description>
    </item>
    
  </channel>
</rss>
