ethico's blog

By ethico, history, 19 months ago, In English

is this really an actual hacking attempt? why it seems fake to me? I may be wrong, correct me if i am.

i have many more screenshot of previous contests, which have the similar pattern of hacking.

Hack Code:

![](https://ibb.co/prfM3VY)

Hack Test Case: ![](https://ibb.co/z64gkmw)

Submission link : Link

Full text and comments »

  • Vote: I like it
  • +13
  • Vote: I do not like it

By ethico, history, 5 years ago, In English

Hey fellows,

-->i want to know about memset,how its work,because when i put 0 or -1 as like as memset(a,-1,a.sizeof(a)) or memset(a,0,a.sizeof(a)),i am getting values,but if i put any other random number,why it is showing garbage values?

--> moreover,can u guys suggest me online best website for learning **cpp(c++).

Full text and comments »

  • Vote: I like it
  • -9
  • Vote: I do not like it

By ethico, history, 5 years ago, In English

usually when i started coding and started learning about string array or normal array ,i used to work with string array or array by typing strlen() or size() in the for loop condition.

for(int i=0;i<strlen();i++)
{
    statement;
}

but its a totally wrong way to set up the condition.because normally if my algorithms complexity is O(n),and i use strlen() it,my time complexity will become O(n^2). **** this happens because every time for loop come to check the condition it will start checking what is the string length is,so total complexity will become n*n = n^2 **** so to avoid this kind of situation ,declare integer variable n= strlen(),and then put the code like this

int n= strlen();
for(int i=0;i<n;i++)
{
    statement;
}

i hope this will be helpful :).

Full text and comments »

  • Vote: I like it
  • +35
  • Vote: I do not like it