Giter Site home page Giter Site logo

algorithm's Introduction

Hi there ๐Ÿ‘‹

Work Experience

  • Data Platform at Zigbang (Jul. 2021 ~ Nov. 2023, about 2 years 4 months)
  • Catalog Platform at S-Core, (Aug. 2018 ~ Jul. 2021, about 3 years)
  • Network Monitoring Solution at Atto Research (Feb. 2017 ~ Aug. 2018, about 1.5 years)
  • Embedded Software at Opticis (May. 2015 ~ Feb. 2017, about 1.5 years)

Education

  • DGIST (Daegu Gyeongbuk Institute of Science and Technology) (Mar. 2013 ~ Feb. 2015), master degree
  • Hanbat National University (Mar. 2009 ~ Feb. 2013), bachelor's degree

CERTIFICATIONS

  • AWS Certified Solutions Architect โ€“ Associate, Verify, (Expires on 17 Dec. 2024)

algorithm's People

Contributors

dependabot[bot] avatar llama90 avatar

Watchers

 avatar

algorithm's Issues

Day 1 Binary Search

Problems

Binary Search Algorithm

Overview

Binary Search is a search algorithm that finds the position of a target value within a sorted array.

Time Complexity

Time complexity is $ O(log n) $ in the worst case.

  • where $ n $ is the number of elements in the array.

Space Complexity

The space complexity is $ O(1) $

  • requires three-pointers to point index such as low, high, and mid regardless of the size of the array.

Procedure

Procedure binary_search
   A โ† sorted array
   n โ† size of array
   x โ† value to be searched

   Set lowerBound = 1
   Set upperBound = n 

   while x not found
      if upperBound < lowerBound 
         EXIT: x does not exists.
   
      set midPoint = lowerBound + ( upperBound - lowerBound ) / 2
      
      if A[midPoint] < x
         set lowerBound = midPoint + 1
         
      if A[midPoint] > x
         set upperBound = midPoint - 1 

      if A[midPoint] = x 
         EXIT: x found at location midPoint
   end while
   
end procedure

Reference

leetcode, 14 Days Study Plan to Crack Algo

Day 2 Two Pointers

Problems

Two Pointers

Overview

The pointers refer to an array's indexes. By using pointers, we can process two elements per loop, instead of just one.

  • Two pointers each starting from the beginning and the end until they both meet
  • One pointer moves at a slow pace while the other pointer moves at a faster pace

Both of the above patterns can reduce the time and space complexity.

Example

  • Sum Exists in an Array
  • Rotate Array k Steps
  • Middle Element in a LinkedList

Reference

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.