About Me

About Me : I have been working as a Software Engineer for various international companies for four years.Currently, I am working as a full stack Javascript developer in Petronas(Malaysia).

Skills

Skills • Javascript •Typescript •Python •C •Java •ReactJs • Redux • VueJs • NestJs • React Testing Library • Django• PostgreSQL • MySQL • NodeJs • Git • Docker • Jira • Visual Studio Code • Slack

বুধবার, ১৯ ফেব্রুয়ারী, ২০১৪

URI-1234 Dancing Sentence

link#
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;

int main (){
  char a[10000],b[10000];
  int l,i,f,j;

  while(gets(a)){
      f=1;j=0;
     l=strlen(a);
     for(i=0;i<l;i++){
       if((a[i]>='a'&& a[i]<='z')||(a[i]>='A'&& a[i]<='Z')){
         if(f%2!=0){
           if((a[i]>='a'&& a[i]<='z')){
              a[i]-=32;
          }
        }
       else if(f%2==0){
           if((a[i]>='A'&& a[i]<='Z')){
              a[i]+=32;
       }
        }
       f++;
      }
      b[j]=a[i];
      j++;

    }
    b[j]='\0';
     puts(b);

  }

return 0;
}

সোমবার, ১০ ফেব্রুয়ারী, ২০১৪

Light oj : 1294 - Positive Negative Sign

Link#

#include <stdio.h>
int main()
{

     long long t,i,n,m,x;
       scanf("%lld",&t);
       for(i=1;i<=t;i++){
        scanf("%lld %lld",&n,&m);
        x=(n/2)*m;
        printf("Case %lld: %lld\n",i,x);
        }


    return 0;
}

Light oj: 1182 - Parity

LINK#

#include <stdio.h>
int main()
{
    int a[10000],i,j,t,x,num,count,m;
    scanf("%d",&t);
    for(x=1;x<=t;x++){
      scanf("%d",&num);
       j=0;count=0;
        for(i=num;0<i;i/=2){
          a[j]=i%2;
            j++;
       }
              for(m=0;m<j;m++){
                if(a[m]==1){
                 count++;
        }
       }
    if(count%2==0){
        printf("Case %d: even\n",x);
       }
    else
       printf("Case %d: odd\n",x);
    }
    return 0;
}

Light Oj: 1338 - Hidden Secret!

#include <stdio.h>
#include <string.h>


int main()
{
    int t,i,l1,l2,j,m,p,x,y,l3,l4;
    char a[10000],b[10000],c[10000],d[10000],e;
    scanf("%d",&t);
     getchar();
    for(m=1;m<=t;m++){
        gets(a);
        gets(b);
        l1=strlen(a);
        l2=strlen(b);
        x=0;y=0;p=0;
        for(i=0;i<l1;i++){
            if(a[i]>='a'&&a[i]<='z'){
                a[i]=a[i]-32;
            }
            }
            for(i=0;i<l1;i++){
                if(a[i]!=' '){
                    c[x]=a[i];
                    x++;
                }
            }
            c[x]='\0';
        for(i=0;i<l2;i++){
            if(b[i]>='a'&&b[i]<='z'){
                b[i]=b[i]-32;
            }
        }
        for(i=0;i<l2;i++){
            if(b[i]!=' '){
                d[y]=b[i];
                y++;
            }
        }
          d[y]='\0';
        l3=strlen(c);
        l4=strlen(d);
   for(i=0;i<l3-1;i++){
      for(j=0;j<l3-1;j++){
          if(c[j]>c[j+1]){
            e=c[j];
            c[j]=c[j+1];
            c[j+1]=e;
          }
    }
   }
    for(i=0;i<l4-1;i++){
      for(j=0;j<l4-1;j++){
          if(d[j]>d[j+1]){
            e=d[j];
            d[j]=d[j+1];
            d[j+1]=e;
          }
    }
   }

if(strcmp(c,d)==0)
    printf("Case %d: Yes\n",m);
else
    printf("Case %d: No\n",m);



    }
    return 0;
}

শনিবার, ৮ ফেব্রুয়ারী, ২০১৪

UVA :10035 - Primary Arithmetic

LINK #
#include <stdio.h>
int main()
{
    long long a,b,c,x,y,sum;
    while(scanf("%lld %lld",&a,&b)==2){
        if(a==0 && b==0)
            break;
           sum=0;
           c=0;
        while(1){
     if(a==0&&b==0) break;
            x=a%10;
            y=b%10;
            sum=sum+x+y;
            if(sum>9){
                sum=1;
                c++;
        }else{
        sum=0;
        }
            a=a/10;
            b=b/10;

        }

       if(c==0){
        printf("No carry operation.\n");
       }else if(c==1){
        printf("%lld carry operation.\n",c);
       }else{
       printf("%lld carry operations.\n",c);
       }

    }
    return 0;
}

শুক্রবার, ৭ ফেব্রুয়ারী, ২০১৪

UVA : 458-The Decoder

Link#458-The Decoder
#include <stdio.h>
#include <string.h>

int main()
{
   char a[1000];
   int l,i;
   while(gets(a)){
        l=strlen(a);
        for(i=0;i<l;i++){
                if(a[i]=='\n'){
                    printf("\n");
                }
                else{
                    printf("%c",a[i]-7);
                }
        }
        printf("\n");
   }
    return 0;
}

বৃহস্পতিবার, ৬ ফেব্রুয়ারী, ২০১৪

UVA : 10783 - Odd Sum

Link : Odd Sum
#include <stdio.h>
int main()
{
   int i,j,t,a,b,sum;
   scanf("%d",&t);
    for(j=1;j<=t;j++){
            sum=0;
        scanf("%d %d",&a,&b);
        if(a>b){
    for(i=a;i>=b;i--){
       if(i%2!=0){
        sum+=i;
       }
    }
    printf("Case %d: %d\n",j,sum);
        }
        else  {
      for(i=a;i<=b;i++){
       if(i%2!=0){
        sum+=i;
       }
    }
    printf("Case %d: %d\n",j,sum);

        }

   }
    return 0;
}


মঙ্গলবার, ৪ ফেব্রুয়ারী, ২০১৪

AIZU ONLINE JUDGE : X CUBIC

Link: ITP1_1_A:   Hello World


#include <stdio.h>
#include <math.h>


int main()
{
    int a,b;
    scanf("%d",&a);
    b=pow(a,3);
    printf("%d\n",b);
    return 0;
}

রবিবার, ২ ফেব্রুয়ারী, ২০১৪

Competitive Programming ( Geometry Basics)

জ্যামিতি :

বেসিক জ্যামিতি সুত্র :
সরলরেখা, বৃত্ত,ত্রিভুজ,চতুর্ভুজ ,ট্রাপিজিয়াম , গোলক ,বহুভুজ সুত্রাবলি
Competitive Programming by F.H & S.H- 7.2 Geometry Basics
http://www.mathsisfun.com/geometry/
https://www.khanacademy.org/math/geometry
http://aleph0.clarku.edu/~djoyce/java/elements/toc.html


Dot Product & Cross Product :
http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=geometry1

Line-Point Distance:
http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=geometry1

Line-Line Intersection :
http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=geometry2
Competitive Programming by F.H & S.H-7.4 Intersection Problems

Segment Intersection(Line):
http://www.geeksforgeeks.org/check-if-two-given-line-segments-intersect/

Polygon Area & Perimeter:
http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=geometry1
Competitive Programming by F.H & S.H- Paze 126

Circle Intersection :
http://mathworld.wolfram.com/Circle-CircleIntersection.html
http://mathforum.org/library/drmath/view/51836.html

Reflection & Rotation of Line:
http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=geometry2

CCW (Counter Clockwise) Test:
Competitive Programming by F.H & S.H- Paze 127

Convex Hull :
http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=geometry2
Competitive Programming by F.H & S.H-7.3 Graham’s Scan
http://www.geeksforgeeks.org/convex-hull-set-1-jarviss-algorithm-or-wrapping/

Line Sweep Algorithms:
http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=lineSweep

Point In Triangle:
http://www.geeksforgeeks.org/check-whether-a-given-point-lies-inside-a-triangle-or-not/

Point In Polygon:
http://www.geeksforgeeks.org/how-to-check-if-a-given-point-lies-inside-a-polygon/
http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=geometry3

Closest Pair of Point :
http://www.geeksforgeeks.org/closest-pair-of-points/
en.wikipedia.org/wiki/
Closest_pair_of_points_problem
www.cs.ucsb.edu/~suri/cs235/ClosestPair.pdf

Great-Circle Distance:
Competitive Programming by F.H & S.H- Paze 125
http://en.wikipedia.org/wiki/Great-circle_distance

Circle Union :
http://chorui12.blogspot.com/

Bisection Method:
Competitive Programming by F.H & S.H - Paze 131

Computational Geometry (Advanced):
http://www.personal.kent.edu/~rmuhamma/Compgeometry/compgeom.html
http://www.randygaul.net/category/computational-geometry/
http://blog.informationgeometry.org/

Using Geometry in TopCoder Problems :
http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=geometry3

ফুল ডকুমেন্টারি :http://mathworld.wolfram.com/topics/Geometry.html      
Collected From : https://www.facebook.com/presource

Competitive Programming by F.H & S.H- 7.2 Geometry Basics

শনিবার, ১ ফেব্রুয়ারী, ২০১৪

UVA : 10931 - Parity

Link #UVA: 10931-Parity

#include <stdio.h>

int main()
{
  long long a[1000],num,i,j,sum;
  while((scanf("%lld",&num))==1){
        if(num==0)
        break;
        i=0;sum=0;
   while(num>0){
    a[i]=num%2;
    num=num/2;
    i++;
    }
    printf("The parity of ");
    for(j=i-1;j>=0;j--){
            if(a[j]==1)
            sum++;
        printf("%lld",a[j]);
    }
  printf(" is %lld (mod 2).\n",sum);

  }
 return 0;
}

UVA : 575-Skew Binary

link  575-Skew Binary

#include<stdio.h>
#include<math.h>
#include<string.h>
int main()
{
    long int l,i,s,c;
    char a[100];
    while(scanf("%s",a)){
            s=0;
    l=strlen(a);
    for(i=0;i<l;i++){
            c=a[i]-'0';
    s+=c*(pow(2,l-i)-1);
    }
    if(s==0)
    break;
    printf("%ld\n",s);}
    return 0;
    }