Skip to content

Instantly share code, notes, and snippets.

Avatar

Rabiul Awal rabiulcste

View GitHub Profile
View BanglaLekhaCONV
#!/usr/bin/env python
# coding: utf-8
# In[1]:
# Importing necessary libraries
import numpy as np
import pandas as pd
import os
View Story of Top 500 Indian Cities.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Intro to Python Data Visualization and Machine Learning using Iris Data.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Factorial.cpp
#include <bits//stdc++.h>
using namespace std;
int a[10000];
int m, n, x, temp, sum, i, j;
int main()
{
while(scanf("%d", &n)==1){
a[0] = 1;
View map.cpp
int main()
{
int n;
scanf("%d", &n);
map<string, int>mp;
for(int i=0; i<n; i++){
string s;
cin>>s;
if(mp[s] == 0) {mp[s]++; printf("OK\n");}
else {
View Shortest Common Subsequence.cpp
vector<char> vc;
char s1[1005] , s2[1005];
int dp[105][105];
void backtrace(int i, int j)
{
if(i == 0 || j == 0)
return;
else if(s1[i-1] == s2[j-1]) {
backtrace(i-1, j-1);
View Sieve Prime.cpp
#define MAX 1000001
char prime[MAX]; // 0 দিয়ে initialize করতে হবে
void seive( int n ) // n পর্যন্ত প্রাইম বের করব
{
int x = sqrt( n );
prime[0] = prime[1] = 1; // 0 এবং 1 প্রাইম না
for( int i = 4; i <= n; i += 2 ) // জোড় সংখ্যাগুলোকে বাদ দিয়ে দিব
prime[i] = 1;
View Prime Check Brute Force.cpp
bool isPrime(int n) {
if(n < 2) return false;
for(int i = 2; i < sqrt(n); i++)
if(n%i == 0) return false;
}
View Euler Pi.cpp
ll totient (ll i)
{
ll res; /* Result */
ll j;
if (i==1) return 1;
res=i;
// Check for divisibility by every prime number below the square root.
View Set Bit Counting - Simple Method.cpp
int countSetBits(unsigned int n)
{
unsigned int count = 0;
while(n)
{
count += n & 1; // ভাগশেষ ০ নাকি ১ । যদি ১ হয় তাহলে কাউন্টের মান বেড়ে যাবে ।
n >>= 1; // n কে দুই দিয়ে ভাগ করা হচ্ছে ।
}
return count;
}