#### Category : logic

The problem is: A string s is good if it is possible to rearrange the characters of s such that the new string formed contains "prep" as substring. So the string "proper" is good but "poor" is not. Given an integer n, find the number of only lowercase English characters. As this number might be ..

I was just wondering, if i have an if statement with two conditions like: if (a && b) {} are both a and b checked, or if right away a=false it doesn’t check b? I believe it does too, but not sure. (if the language affects, i’m think about c++) Source: Windows Que..

I am a brand-new student of C++ and working through some of the practice exercises in a book called Engineering Problem Solving with C++ by Dolores Etter. I’m currently stuck on an exercise where I have to write a program that determines if a given point lies inside or outside of a defined triangle. In ..

I am a brand-new student of C++ and working through some of the practice exercises in a book called Engineering Problem Solving with C++ by Dolores Etter. I’m currently stuck on an exercise where I have to write a program that determines if a given point lies inside or outside of a defined triangle. In ..

The below script will rename the files in the descending order But i need to reverse the order while renaming (ascending) Here is the script which take files (mp4) from the same folder of the script and renames into sequencial numbers. @echo off setlocal EnableDelayedExpansion set i=0 for /f "tokens=* delims=* " %%a in (‘dir ..

I am a student of first semester and I am making a console based game in c++. There are two players in game, ‘player-2’ is CPU player and ‘player-1’ is controlable player. After every 20 seconds one of player becomes red and other becomes green. The red ones need to catch green one and green ..

I’ve been working on making a basic game loop in C++ and I’m unsure my logic is completely right as my delta time isn’t what I expect. I expect to get 1/60 seconds per frame as my cap is 60fps, but over the average I take I get a delta time of ~0.03 seconds per ..