Giter Site home page Giter Site logo

graph-algorithm's Introduction

Graph-Algorithm ๐Ÿ˜„

  • It contains all graph based algorithm
    • Dijkstra
    • Kruskal
    • Prim
    • Floyd_Warshell

Simple Unioin Implementation { Union-Find (Disjoint Set Union) }

Screenshot from 2024-01-24 11-37-11

class Solution {
private:
    vector<int> parent, Rank;
    int find(int a){
        if(parent[a]==a) return parent[a];
        else return find(parent[a]);
    }
    void Union(int a,int b){
        int par_a=find(a);
        int par_b=find(b);
        if(par_a==par_b) return;
        if(Rank[par_a]>Rank[par_b]){
            parent[par_b]=par_a;
            Rank[par_a]+=Rank[par_b];
        }
        else{
            parent[par_a]=par_b;
            Rank[par_b]+=Rank[par_a];
        }
    }
public:
    int longestConsecutive(vector<int>& nums) {
        int n=nums.size();
        parent.clear(); parent.resize(n+1);
        Rank.clear(); Rank.resize(n+1);
        unordered_map<int,int> Hash;
        Hash.clear();
        int ans=0;

        for(int i=0;i<n;i++){
            parent[i]=i; Rank[i]=1;
        }
        for(int i=0;i<n;i++){
            if(Hash.count(nums[i])) continue;

            if(Hash.count(nums[i]+1)) Union(i,Hash[nums[i]+1]);        
            if(Hash.count(nums[i]-1)) Union(i,Hash[nums[i]-1]);
    
            Hash[nums[i]]=i;
        }
        for(int i=0;i<n;i++) ans=max(ans,Rank[i]);
        return ans;
    }
};

graph-algorithm's People

Contributors

pranabnandy avatar

Stargazers

 avatar

Watchers

 avatar  avatar

graph-algorithm's Issues

Nvidia

Work closely with our diverse team members on flows to provide DFT, and DFP methodologies for industry-leading chip designs.

  • I already worked with multiple teams while doing Automative SOC bring up Linux BSP team, SVE team, PPAT team, performance team etc.
  • For Qultivate feature, We need the Access Policy permission for different FW like CPUCP subsys and CPU sysVM FW. We need to suggest multiple technique so that it won't violate the security policy of the system.
  • While Developing some feature, when there is some different requiement in some different SOC like Monaco only wants Gold & GOLD+ CD to access MPMM feaure where Lemasn GOLD and SILVERS both need the MPMM feaure. Gone through multiple round of discussion with HW team, Linux Team, SVE team and CPU Sys SW team. Finally coming up with accurate solution like rather doing the initialization from CPU CP FW pushed the responsiblity to TZ via SYSTEM INIT LIB.

Support development of tools using C++/Python/TCL.

Automotive SOC

Driver Code I implemented

  1. Design the makefile for Automotive SOC as Build Tools
  2. Develop the sa7xxx_aarch.dts file
  3. Design the sa7xxx_defconfig
  4. Develop the Power Control Unit(PCU) Driver in Arm Trusted Firmware
  5. Develop the pcpu driver of BL32 in Arm Trusted Firmware
  6. Develop qcom-cpufreq-psd driver in Linux
  7. Develop kryo_arm64_edac driver in Linux
  8. Develop clk_ctl driver in CPUCP FW which in used as Coprocessor of CPUSS
  9. Develop cpuinfo driver in CPUCP FW
  10. Added the Qultivate support in the CPUCP FW so that FW works for both partially working Board as well as Fully working board
  11. Added the Qultivate support in debug_vm which is used to record the RAS error in the Arm CPU core

SSIR Automotive - BSP/ Kernel / Multimedia Specialist

SSIR Automotive team is partnering with multiple Tier1/ OEMs in developing End to End solutions based on Samsung's Exynos Auto SOC for IVI/ ADAS

  1. Deep exposure to ARM architecture
  2. Knowledge on Security and Hypervisor
  3. Linux Device Driver development and strong debugging skills at the product level
  4. Working knowledge of QNX/ VxWorks
  5. Hands-on experience working on Bootloader/ Little Kernel / Communication protocols like UART, I2C, SPI
  6. Exposure to Linux Power Management /S2R/ CPU freq/ CPU idle / Runtime PM, Power and Performance Profiling
  7. Working knowledge on High Speed Interfaces PCIe, Ethernet and UFS

Calculation

July -- Course
Aug -- Ari
Sep -- N -- one mail, some start-up mails, some rejections mail
Oct -- N T
Nov -- N mail, ZF group T

Dec -- N T, N I

Jan -- G T, A T

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.