<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>algorithms on Sadman Kabir Soumik</title>
    <link>https://blog.sksoumik.com/tags/algorithms/</link>
    <description>Recent content in algorithms on Sadman Kabir Soumik</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <copyright>Copyright © 2022, Sadman Kabir Soumik</copyright>
    <lastBuildDate>Sun, 26 Feb 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.sksoumik.com/tags/algorithms/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Brute-Force to Optimized Python Solutions for All LeetCode Blind-75 Problems</title>
      <link>https://blog.sksoumik.com/software-engineering/optimized-python-solutions-blind-75-leetcode/</link>
      <pubDate>Sun, 26 Feb 2023 00:00:00 +0000</pubDate>
      
      <guid>https://blog.sksoumik.com/software-engineering/optimized-python-solutions-blind-75-leetcode/</guid>
      <description>
        
          
            Blind-75 is a curated list of 75 LeetCode problems compiled by Yangshun Tay. The list can be accessed at this link.
Initially, I solved each problem using a brute-force approach, which often resulted in a Time Limit Exceeded (TLE) error. Then, I solved each problem with an optimized method that was accepted on LeetCode. For every problem on the list, I have provided both the naive brute force solution and an optimized solution.
          
          
        
      </description>
    </item>
    
    <item>
      <title>Understanding Top 10 Classical Machine Learning Algorithms</title>
      <link>https://blog.sksoumik.com/artificial-intelligence/common-machine-learning-algorithms/</link>
      <pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
      
      <guid>https://blog.sksoumik.com/artificial-intelligence/common-machine-learning-algorithms/</guid>
      <description>
        
          
            Before jumping into Deep Learning, one must know the classical/traditional Machine Learning algorithms, because understanding traditional machine learning algorithms can provide a strong foundation in machine learning concepts. These algorithms often involve simple, intuitive concepts that can be helpful in understanding more complex deep learning models.
Traditional machine learning algorithms can be faster to train and easier to interpret than deep learning models. This can be particularly useful in situations where you need to make quick decisions or where it&#39;s important to understand the reasoning behind a model&#39;s predictions.
          
          
        
      </description>
    </item>
    
    <item>
      <title>Cracking the LeetCode Two Sum Variations - All 5 Problems</title>
      <link>https://blog.sksoumik.com/software-engineering/all-leetcode-two-sum-problem-variations-with-python-solutions/</link>
      <pubDate>Fri, 21 Oct 2022 00:00:00 +0000</pubDate>
      
      <guid>https://blog.sksoumik.com/software-engineering/all-leetcode-two-sum-problem-variations-with-python-solutions/</guid>
      <description>
        
          
            Author: Sadman Kabir Soumik
Original Two Sum Problem Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer in any order.
1Example 1: 2Input: nums = [2,7,11,15], target = 9 3Output: [0,1] 4Explanation: Because nums[0] + nums[1] == 9, we return [0, 1].
          
          
        
      </description>
    </item>
    
    <item>
      <title>All 6 Best Time to Buy and Sell Stock Problems Using The Same Formula</title>
      <link>https://blog.sksoumik.com/software-engineering/best_time_to_buy_all_sell_stocks_all_problems/</link>
      <pubDate>Wed, 15 Jun 2022 00:00:00 +0000</pubDate>
      
      <guid>https://blog.sksoumik.com/software-engineering/best_time_to_buy_all_sell_stocks_all_problems/</guid>
      <description>
        
          
            122.Best Time to Buy and Sell Stock II You are given an integer array prices where prices[i] is the price of a given stock on the ith day.
On each day, you may decide to buy and/or sell the stock. You can only hold at most one share of the stock at any time. However, you can buy it then immediately sell it on the same day.
Find and return the maximum profit you can achieve.
          
          
        
      </description>
    </item>
    
    <item>
      <title>Be a Master at Python Through Some Cool Code Snippets</title>
      <link>https://blog.sksoumik.com/software-engineering/python-code-snippets-tricks-tips/</link>
      <pubDate>Sun, 27 Jun 2021 00:00:00 +0000</pubDate>
      
      <guid>https://blog.sksoumik.com/software-engineering/python-code-snippets-tricks-tips/</guid>
      <description>
        
          
            Combine two lists as a dictionary | dict(zip) Program
1keys = [&amp;#39;a&amp;#39;, &amp;#39;b&amp;#39;, &amp;#39;c&amp;#39;] 2values = [1, 2, 3] 3dictionary = dict(zip(keys, values)) 4print(dictionary) Output
1{&amp;#39;a&amp;#39;: 1, &amp;#39;b&amp;#39;: 2, &amp;#39;c&amp;#39;: 3} Program
1keys = (&amp;#39;name&amp;#39;, &amp;#39;age&amp;#39;, &amp;#39;location&amp;#39;) 2values = (&amp;#39;Soumik&amp;#39;, 26, &amp;#39;Bangladesh&amp;#39;) 3 4new_dict = dict(zip(keys, values)) 5print(new_dict) Output
1# output 2{&amp;#39;name&amp;#39; : &amp;#39;Soumik&amp;#39;, &amp;#39;age&amp;#39; : 26, &amp;#39;location&amp;#39; : &amp;#39;Bangladesh&amp;#39;} Create nested directory Program
1from pathlib import Path 2 3Path(&amp;#34;father/child&amp;#34;).mkdir(parents=True, exist_ok=True) We can also the os module.
          
          
        
      </description>
    </item>
    
    <item>
      <title>Understanding Logarithm Function</title>
      <link>https://blog.sksoumik.com/software-engineering/understanding-logarithm-function-computer-science/</link>
      <pubDate>Tue, 06 Aug 2019 00:00:00 +0000</pubDate>
      
      <guid>https://blog.sksoumik.com/software-engineering/understanding-logarithm-function-computer-science/</guid>
      <description>
        
          
            Logarithms are mathematical operations that are the inverse of exponentiation. In other words, if we have a base b and an exponent x, the logarithm of the resulting number y to the base b is x. This can be written as log_b(y) = x.
For example, the logarithm of 1000 to base 10 is 3, because 10^3 = 1000. Similarly, the logarithm of 100 to base 10 is 2, because 10^2 = 100.
          
          
        
      </description>
    </item>
    
    <item>
      <title>Understanding Graph Traversal - BFS vs DFS</title>
      <link>https://blog.sksoumik.com/software-engineering/understanding-graph-traversal-bfs-dfs/</link>
      <pubDate>Tue, 12 Mar 2019 00:00:00 +0000</pubDate>
      
      <guid>https://blog.sksoumik.com/software-engineering/understanding-graph-traversal-bfs-dfs/</guid>
      <description>
        
          
            Breadth-first search (BFS) and depth-first search (DFS) are two algorithms for traversing graphs. These algorithms are used to search for specific nodes or to find the shortest path between two nodes in a graph.
BFS The breadth-first search (BFS) algorithm is a graph traversal algorithm that explores all of the neighbors of a starting node before moving on to any of the neighbor&#39;s neighbors. It is called a &amp;quot;breadth-first&amp;quot; algorithm because it explores the neighbors at each level of the graph before moving on to the next level.
          
          
        
      </description>
    </item>
    
    <item>
      <title>Basic Coding Problems You Must Be Able to Solve As a Computer Science Graduate</title>
      <link>https://blog.sksoumik.com/software-engineering/basic_coding_problems_that_you_must_know_as_a_cse_graduate/</link>
      <pubDate>Fri, 22 Feb 2019 00:00:00 +0000</pubDate>
      
      <guid>https://blog.sksoumik.com/software-engineering/basic_coding_problems_that_you_must_know_as_a_cse_graduate/</guid>
      <description>
        
          
            Check Prime Number A prime number is a positive integer greater than 1 that has no positive integer divisors other than 1 and itself. For example, the first six prime numbers are 2, 3, 5, 7, 11, and 13.
The number 6 is not a prime number because it has more than two positive integer divisors. In fact, the divisors of 6 are 1, 2, 3, and 6.
To determine if a number is prime, you can check if it has any positive integer divisors other than 1 and itself.
          
          
        
      </description>
    </item>
    
  </channel>
</rss>
